Any ideas, i have made a previous post about this but i got no replys which gives mthe impression i am doing it wrong
Any tips on how to do this?
essentially i want to automate outlook like this …
Outlook.Application app = null;
if (Process.GetProcessesByName("OUTLOOK").Count() > 0)
{
app = (Microsoft.Office.Interop.Outlook.ApplicationClass)(Marshal.GetActiveObject("Outlook.Application"));
}
this gives me a outlook object, but what method calls are needed to be able to run a particular macro?
Thank you
My answer to your original question:
I thik you’re doing it right, but maybe you don’t meet the security requirements! In order to run a macro, the office file needs to be a trusted source! It must be flagged via the Office Security Center or else you won’t be able to execute macros. You also need to allow access to the VBA Object via the security center for an external app to call the macros!