Author Topic: connect to different version of Ms OFFICE!  (Read 1968 times)

0 Members and 1 Guest are viewing this topic.

Ricky_76

  • Guest
connect to different version of Ms OFFICE!
« on: August 23, 2007, 08:34:30 AM »
Hello!
I have developed some applications to connect autocad and ms Word and ms Excel, but I have to change part of the code each time i move the applications from a computer to another!
The problem is due to a different version of ms Office.
I need to know how to develop an application the works with all versions of office.
Can I include reference to all offices in some way ...

thanks a lot!

/r

DBARANAS

  • Guest
Re: connect to different version of Ms OFFICE!
« Reply #1 on: August 24, 2007, 11:24:24 PM »
I found this:

http://www.vbforums.com/showthread.php?t=402020

It's where I would begin and go from there.

I work with Outlook 2K3/2K7 I have to a similar problem. I guess I would try to use a switch (with above) and try to resolve with something like this:

Code: [Select]
Imports MsOl97 = Microsoft.Office.Interop.Outlook.....
Imports MsOl98 = Microsoft.Office.Interop.Outlook....
Imports MsOl2K0 = Microsoft.Office.Interop.Outlook....
Imports MsOl2K2 = Microsoft.Office.Interop.Outlook.....
Imports MsOl2K3 = Microsoft.Office.Interop.Outlook.....
Imports MsOl2K7 = Microsoft.Office.Interop.Outlook....


« Last Edit: August 24, 2007, 11:50:26 PM by Dave Baranas »

Ricky_76

  • Guest
Re: connect to different version of Ms OFFICE!
« Reply #2 on: August 27, 2007, 02:59:25 AM »
Tank's a lot!

nice link, I'm going to try it NOW!!!

I'll let you know!

/r