How to avoid dependency on Office dll version (MSO.dll)

  • Thread starter Thread starter Orlin Todorov
  • Start date Start date
O

Orlin Todorov

Hello,

My question may be a little stupid, but how should I declare those variables
so that the addin doesn't depend on the version of the Office object model
dll? Right now using the addin sample I have:

Dim cbrNewToolbar As Office.CommandBar
Private WithEvents CBButton As Office.CommandBarButton

This way though I need to have two version of the add-in dll -- one for
Office 2002 and one for Office 2000.

Any advice is greatly appreciated!

Thank you,
Orlin
 
Thank you Ken,

I maybe got confused. Maybe it was a different problem I was experiencing.
I will try again.


Ken Slovak - said:
Just develop your addin using a dev machine with the oldest version of
Outlook you want to support installed. The addin will work with later
versions of Outlook.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Lead Author, Professional Outlook 2000 Programming, Wrox Press
Lead Author, Beginning VB 6 Application Development, Wrox Press
Attachment Options
http://www.slovaktech.com/attachmentoptions.htm
Extended Reminders
http://www.slovaktech.com/extendedreminders.htm


Orlin Todorov said:
Hello,

My question may be a little stupid, but how should I declare those variables
so that the addin doesn't depend on the version of the Office object model
dll? Right now using the addin sample I have:

Dim cbrNewToolbar As Office.CommandBar
Private WithEvents CBButton As Office.CommandBarButton

This way though I need to have two version of the add-in dll -- one for
Office 2002 and one for Office 2000.

Any advice is greatly appreciated!

Thank you,
Orlin
 
Back
Top