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

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
 
O

Orlin Todorov

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top