Version-Neutral PIAs for Office2003-2007 (and beyond)

Add-in Express™ Support Service
That's what is more important than anything else

Version-Neutral PIAs for Office2003-2007 (and beyond)
 
Rob Lorimer




Posts: 10
Joined: 2008-12-03
I would really like to use version neutral PIAs. Problem is that I program to target Office2003 and higher.

I assume that the Office 2000 object model is what your version-neutral PIAs are written against. To aid in programming this, one would most likely need the language reference for Office 2000.

If I have only Office 2003 here at work ... how do I look at the help for Office 2000. The following link lists all the help files associated with Office product versions:

http://support.microsoft.com/kb/222101

Does anyone know a website where these files could be downloaded? So that I can check the specific object model for each version.

Secondly, if the users of my addin are office 2003 and higher, how can I make my project version-neutral for Office2003 and Office2007?

I've already struck a problem where I was developing on a machine with both Office 2003 and 2007 installed. Even though, I reference the Office2003 PIAs, the project actually references (in the GAC) Office 2007! In this circumstance, the deployed project doesn't work on a customer computer with only Office 2003.

This is caused by a 'policy' that M$ has implemented. There are some quite untidy solutions for this eg

http://www.microsoft.com/communities/newsgroups/en-us/default.aspx?...

Does the Add-in Express team have a solution for this ie is it possible to do version-neutral from Office2003 onwards? Is there some way to use the Office2003 PIAs (with your product) while office 2007 is installed ... I'm reluctant to install Office 2007 on my current development machine until I know . Also, will a single deployment work for two machines with different Office versions ie one with only Office2003 and the other with only Office2007?

cheers
Rob :)
Posted 08 Dec, 2008 18:20:46 Top
Eugene Astafiev


Add-in Express team


Posts: 8540
Joined: 2007-07-25
Hi Rob,

Does anyone know a website where these files could be downloaded? So that I can check the specific object model for each version.


Please have a look at this.

Secondly, if the users of my addin are office 2003 and higher, how can I make my project version-neutral for Office2003 and Office2007?


You can use version-specific PIAs for Office 2003. Thus, your add-in will be compatible with Office 2007.

is it possible to do version-neutral from Office2003 onwards?


In such case you need to use version-specific PIAs for Office 2003.

Also, will a single deployment work for two machines with different Office versions ie one with only Office2003 and the other with only Office2007?


Yes, it will.
.NET, Extended MAPI, Windows Phone & RT
Posted 09 Dec, 2008 06:03:23 Top
Rob Lorimer




Posts: 10
Joined: 2008-12-03
Thanks so much for the link into MSDN Office development.

Would you believe that I have a MSDN subscription and never thought to look there! LOL

You didn't mention whether it's 'safe' to have Office 2007 installed (on development PC) when trying to target Office 2003 with add-in express.

There is plenty of discussion about the 'policy' problem caused by Office 2007 PIAs being installed while trying to build for 2003. See my discussion in original post (above)

I assume using the version-neutral PIAs would get around this but in my case I need the extra functionality of Office 2003 eg range.get_Vaue().

Can you please specifically answer the question ... How do we use add-in express to target office 2003-2007 if the development machine has both office 2003 and office 2007 installed ie no 'policy' issue?

see http://www.microsoft.com/communities/newsgroups/en-us/default.aspx?dg=microsoft.public.office.developer.automation...

cheers
Rob



Posted 09 Dec, 2008 15:03:31 Top
Eugene Astafiev


Add-in Express team


Posts: 8540
Joined: 2007-07-25
Hello Rob,

How do we use add-in express to target office 2003-2007 if the development machine has both office 2003 and office 2007 installed ie no 'policy' issue?


You can:
1. Use version-neutral PIAs (automatically generated by Add-in Express wizard).
2. Remove old PIAs in the project references and add a version specific (please make sure that they belong to v.11) ones. Just compile your add-in against them.

Please let me know whether it helps.
.NET, Extended MAPI, Windows Phone & RT
Posted 10 Dec, 2008 08:54:04 Top
Rob Lorimer




Posts: 10
Joined: 2008-12-03
add a version specific (please make sure that they belong to v.11) ones


That does not work! Please read the link I provided ...

V11 changes to V12 automagically

Even though v.11 is referenced, Microsoft has made a 'policy' that causes v.12 to be used if it's installed on the development computer ... you can't do anything in VS2005 to change this behaviour ie no way to 'target' Office 2003 if both Office2003 and Office2007 installed on the development machine ... a deployment of the project will be for 2007 even though you specifically wanted 2003!

Have the developers of Addin Express not tried this yet? Please do try it and offer an "addin express" howto to get around the problem.

Version Neutral PIAs are not an option for me ie I need the speed of range.get_Value to pass arrays.

cheers
Rob
Posted 10 Dec, 2008 14:54:51 Top
Eugene Astafiev


Add-in Express team


Posts: 8540
Joined: 2007-07-25
Hello Rob,

Please open the Visual Studio environment, select the Tools menu | Options | expand the Office Tools node | select the Project Upgrade leaf and uncheck the following options:

* Prompt for file format during upgrade.
* Always upgrade to installed version of Office.

Please let me know whether it helps.
.NET, Extended MAPI, Windows Phone & RT
Posted 11 Dec, 2008 09:39:26 Top
T Rolle




Posts: 32
Joined: 2006-07-23
Hi Rob,

sounds like our apps have very similar requirements...

my app is destined for Office 2003 and 2007. I thought I could combine both versions into one solution but found out that that's not the best practice. here's what I did and it works great:

I have an adx version for Office 2003 and I only use 2003 PIAs for that. I have an adx version for Office 2007. I installed VS SP1 and use only the 2007 PIAs there. I use VS2008.

I have Office 2003 installed on my C:\ drive and then I partitioned the hard drive and installed Office 2007 on the second hard drive.

Now, in VS when I F5 in the 2003 version, Word 2003 runs correctly and when I F5 version 2007, Word 2007 runs correctly.

You also have to make sure and uncheck the Wizard's automatic upgrade to 2007 in Tools-->Options.

This topic is discussed here: http://blogs.msdn.com/vsto/archive/2008/11/13/devconnections-conference-vsto-session-demos.aspx
Posted 11 Dec, 2008 21:04:54 Top
Rob Lorimer




Posts: 10
Joined: 2008-12-03
Thanks ever so much ... exactly what I needed to know.

Would be nice to create a "version neutral" version tho

cheers
Rob
Posted 11 Dec, 2008 21:26:27 Top
Eugene Astafiev


Add-in Express team


Posts: 8540
Joined: 2007-07-25
Hi Tonio,

Thank you for sharing your knowledge.
.NET, Extended MAPI, Windows Phone & RT
Posted 12 Dec, 2008 05:29:16 Top