Quantcast
Channel: .NET Framework Class Libraries forum
Viewing all articles
Browse latest Browse all 8156

How to run Outlook VBA sub from Outlook dll

$
0
0

Hi

I have c# COM dll (Net 4 for client) for Outlook  2007

The dll has to run VBA sub (both dll & sub run on Outlook)

invoke method crashes Outlook, so i try

 System.Type objAppType = System.Type.GetTypeFromProgID("Outlook.Application");
 object objApp = System.Runtime.InteropServices.Marshal.GetActiveObject("Outlook.Application");
                Debug.Write  ("1");
 objAppType.InvokeMember("CB", System.Reflection.BindingFlags.Default | System.Reflection.BindingFlags.InvokeMethod, null, objApp, strArr);
                Debug.Write  ("2");
This does not run sub CB (debug print / write do not work)

No exception is caused by this code

Any help would be appreciated

Thanks





Viewing all articles
Browse latest Browse all 8156

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>