Communicating with Property Pages

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi Team,

I'm very close to issuing my Outlook toolbar and I'm really grateful to all
who have posted answers to my questions.

I have an ActiveX control which is being used as a Tools > Options tab in
Outlook. It's in a separate project within the project group (because I
can't set an ActiveX control as public in the project type I'm using) which
is working ok, other than in Debug mode :(

My question is: How can I let the ActiveX control know simple things from
the main project such as App.Version etc. -OR- how can I have the property
page as part of the main project and not a separate OCX?

Hope this makes some sense.

Ta,

Rob
 
Hi Ken,

thanks for the advice.

I'm now up and running. One more follow-up question is:

When, in the Property Page, I have the line:

Set myObj = Application.COMAddIns.Item("MyOfficeAddin.Connect").Object

as per the Microsoft KB page you sent me, is there a way I can dim myObj to
give me intellisense access to the public variables in MyOfficeAddIn.Connect?
 
No, you can't early bind to get intellisense on that.

What I usually do myself is set up public properties and methods in the
designer that end up exposed to the property page. Then if a configuration
in the property page is changed I can call the method in the addin to update
things. I can read and set the public properties as needed to get/send
information with the addin.

BTW, if you need reference to the Outlook.Application object in your
property page code make sure to declare it this way to get a copy of the
trusted object from your addin:

Implements Outlook.PropertyPage
Dim objSite As Outlook.PropertyPageSite

' In the UserControl_InitProperties procedure:

Set objSite = Parent
Set golApp = objSite.Application 'golApp is global Outlook object for PP
 
Back
Top