newbee question sorry

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

newbee question sorry
how to acccess the outlook app 
claudio reyes

Posts: 4
Joined: 2017-04-24
Hi I am new to add-in express and have to deliver an outlook integration.

I have a addinmodule where I added a AdxOlFormsManager and hooked up a SPNavigator.vb (adxform outlook) on the explorer hook and it works great! So far I am a happy pappy :-)

However in my form spanavigator.vb I can not get the outlookapp object I have a treeview control where I a want to capture the onenter (drag and drop).

Private Sub TreeView_DragEnter(sender As Object, e As DragEventArgs) Handles TreeView.DragEnter
Here I need to get the outlookapp????
End Sub
I have read the manual and looked at the different code examples this may be very obvious and then I am sorry but I am stuck. Kindly appreciate any assistance

Posted 24 Apr, 2017 12:59:48 Top
claudio reyes

Posts: 4
Joined: 2017-04-24
Hi again...

This is driving my nuts!
I have tried everything from creating objects to getting the actual value.

Dim ad As New AddinModule()
Dim ou As Outlook.Application
ou = ad.OutlookApp

But I still get no reference to the Outlookapp.

Please help!
Posted 25 Apr, 2017 03:01:35 Top

Posts: 517
Joined: 2011-03-28
You don't need to create a new Addinmodule in your code (I don't even know the ramifications of doing such thing); just reference your existing COM module. You can get it through the ADXAddinModule.CurrentInstance and then call the OutlookApp property of it (sorry, this is in C# but I believe it should be similar in vb).
Posted 25 Apr, 2017 08:53:04 Top
claudio reyes

Posts: 4
Joined: 2017-04-24
Hi I appreciate the helping hand.

OK what I did was accessed an instance ADXAddinModule

Dim am As ADXAddinModule
am = ADXAddinModule.CurrentInstance()

But I get a compile error
Error BC30367 Class 'ADXAddinModule' cannot be indexed because it has no default property.

This is a becoming an embarassing issue for me and I have read through the documentation and everywhere where is involved the manual claims that it is just to access the app:

Public Function GetOutlookVersoin() As String
Return Me.OutlookApp.Version
End Function

The above is a very simple function that uses the OutlookApp property to return the version of Outlook hosting the add-in. Here, Me is the AddinExpress AddinModule and OutlookApp is the Outlook Application object. Simple enough."

But in my code that is not possible. What am I doing wrong.

Posted 25 Apr, 2017 11:02:00 Top

Posts: 517
Joined: 2011-03-28
The property should be declared in the addinmodule (auto-generated by ADX template).
You can look at Andrei's response for the very same question here
Posted 25 Apr, 2017 11:13:57 Top
Andrei Smolin

Add-in Express team

Posts: 15572
Joined: 2006-05-11
Thank you very much, Nir!


Does the above work for you?

Regards from Belarus (GMT+3),‎

Andrei Smolin
Add-in Express Team Leader
Posted 26 Apr, 2017 03:25:15 Top