AddInExpress equivalent of Globals.ThisAddIn

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

AddInExpress equivalent of Globals.ThisAddIn
 
Jimmy Kavanagh




Posts: 10
Joined: 2010-04-27
I am porting a VSTO addin to your product which I purchased yesterday. I have a line of code like this

sfm.Item = Globals.ThisAddIn.Redemption.GetMessageFromID(m_Mail.EntryID)

I have created a public property on the VSTO generated ThisAddIn which returns a reference to Redemption.

I have created a similar property on the AddInModule generated by your wizard. But i cant see how to reference the AddInModule in code - there is no equivalent of Globals.ThisAddIn

Thanks!
Posted 27 Apr, 2010 02:32:58 Top
Andrei Smolin


Add-in Express team


Posts: 14720
Joined: 2006-05-11
Hi Jimmy,

To access that property you need to cast AddinExpress.MSO.ADXAddinModule.CurrentInstance to the type of your add-in module (say, MyAddin1.AddinModule).

Regards from Belarus (GMT+2),

Andrei Smolin
Add-in Express Team Leader
Posted 27 Apr, 2010 03:20:12 Top
Jimmy Kavanagh




Posts: 10
Joined: 2010-04-27
Excellent - Thanks Andrei. I have just purchased your product, so you will probably be seeing a lot of posts from me over next few days ;)
Posted 27 Apr, 2010 05:07:16 Top
Andrei Smolin


Add-in Express team


Posts: 14720
Joined: 2006-05-11
You are welcome :)

Regards from Belarus (GMT+2),

Andrei Smolin
Add-in Express Team Leader
Posted 27 Apr, 2010 05:16:53 Top