GuyLowndes

I'm looking to upgrade a single PC that has Office XP installed so it can use an application written using Visual Studio 2005 Tools for the Microsoft Office System.

I obviously want to get the most current version there is but I'm not sure if there are any implications on using Office 2007 or should I stick to Office 2003 for now


Re: Visual Studio Tools for Office Office 2003 or 2007

Douglas H. Troy

Well, I have an Office 2003 VSTO Solution that I have running on both '03 and '07 ... I can tell you that you will be unable to setup your development environment on a system with Office 2007 installed, using a VSTO solution, because the VSTO won't install; the run-time will, but not the actual VSTO development SDK.

So, you have a choice:
1. port your existing VSTO project to the VSTO SE ... not too difficult, mind-you, but you may have to make some logic changes to handle going from a document-level add-in to an application-level add-in. This way you can install and debug on '07.

2. Install and run Office 2003; which, by-the-way, in doing so, allows you to develop a solution that is capable of running on either '03 or '07. So you'll be able to develop and debug under '03 and then just install and run on '07 (works for me so far).

Hope that helps.







Re: Visual Studio Tools for Office Office 2003 or 2007

GuyLowndes

Thanks for the reply, that's exactly the type of answer I was after.

I'll keep office 2003 on the development machine but I'll update the users machine to 2007.

Just one more question, I presume I only have to distribute with office2003pia fr a user with office 2007




Re: Visual Studio Tools for Office Office 2003 or 2007

Douglas H. Troy

No, actually, you'll distribute the VSTO runtime and the Office 2007 PIAs. But in your actual development project, you'll be building against the Office 2003 PIAs.

You have to deploy the 2007 PIAs on Office 2007, because those are the managed API wrappers for that office version, and while running a 2003 VSTO solution on 2007 works, there are different (newer) APIs in 2007 that must be handled.

So, to break it down for you:
Under Office 2003, you'll install the VSTO Runtime and the 2003 PIAs
Under Office 2007, you'll install the VSTO Runtime and the 2007 PIAs







Re: Visual Studio Tools for Office Office 2003 or 2007

GuyLowndes

Thanks for the feedback.

So if I'm distributing to some machines that have office 2003 and some that have office 2007 I'll need two different setup files, one for each situation.




Re: Visual Studio Tools for Office Office 2003 or 2007

Douglas H. Troy

Well, you can have two installers, I use Wise as my installation package of choice, so I created a single installer that determines the version of Office installed, and lays down the appropriate PIAs.

There's probably a way to do this same thing in Windows Installer package through custom actions; you could probably hack out a C# Dll that checks the installed office version and you could kick off the PIA installer based off the Office version installed ... but as I said, I use Wise, so I can't give you direction on Windows Installer.

To check for the installed version of Office/Word, I use the following registry key:
HKEY_CLASSES_ROOT\Word.Application\CurVer

If the value is 'Word.Application.11' then you have Word 2003 installed
If the value is 'Word.Application.12' then you have Word 2007 installed

Hope that helps.





Re: Visual Studio Tools for Office Office 2003 or 2007

GuyLowndes

Thanks for the answer, that pretty much sorts me out, I now know what direction to take.

Also, I'll start introducing office 2007 PIAs immediately to my set up programs so I don't have to create a load of new set up programs if the entire company upgrades to 2007.




Re: Visual Studio Tools for Office Office 2003 or 2007

Westman

Hi Douglas,

My Case:

I'm using Wise installer to install the Office 2007(word,Excel, ppoint) add-in. So, I included PIA 2007 and also the VSTOR as the prequisites for the add-in. Right now, PIA will be installed everytime I run the setup file. For the VSTOR, I make Wise to check the registry key HKLM\SOFTWARE\Microsoft\vsto runtime Setup\v2.0.50727 --- Upadate key.

1) How to know/check whether a PC have already PIA installed Registry key GAC folder Filename

2) If the PIA is installed so many times, will it break something reference

Regards,

Westman