Using the OutlookApp object outside of AddinModule

Add-in Express™ Support Service
That's what is more important than anything else

Using the OutlookApp object outside of AddinModule
 
Nekker




Posts: 4
Joined: 2010-05-10
Hello,

Could you help me how I can use OutlookApp object outside of AddinModule?
Posted 10 May, 2010 08:10:19 Top
Heinz-Josef Bomanns




Posts: 206
Joined: 2008-02-28
Declare a Public variable like this:

Public gobjOutlook As Outlook.Application

In event AddinModule_AddinInitialize initialize it like this:

gobjOutlook = Me.OutlookApp()

Now you can use it in your modules...

Finally in AddinModule_AddinBeginShutdown deinitialize it like this:

gobjOutlook = Nothing
__________________
Greetings, HJB
Posted 10 May, 2010 08:49:42 Top
Andrei Smolin


Add-in Express team


Posts: 16662
Joined: 2006-05-11
Thank you, HJB!

Hi Nekker,

A raw sketch:

Outlook.Inspector = (AddinExpress.MSO.ADXAddinModule.CurrentInstance as Myaddin1.AddinModule).OutlookApp.ActiveInspector() 


Regards from Belarus (GMT+2),

Andrei Smolin
Add-in Express Team Leader
Posted 10 May, 2010 09:07:32 Top
Eugene Astafiev


Add-in Express team


Posts: 8540
Joined: 2007-07-25
Hello Nekker,

Please note that the OutlookApp is just a property of the add-in module class. You are eligible to declare a variable of the Outlook.Application class in your code.
.NET, Extended MAPI, Windows Phone & RT
Posted 10 May, 2010 09:11:06 Top