VSTO In VS2008 With Office 2003 And Office 2007

C

Chip Pearson

I don't know if this is the right group, but I couldn't find a VSTO
group. I have Visual Studio 2008 Pro and both Office 2003 and Office
2007 on my main development machine (Vista Ultimate 32bit). Am I
correct in assuming that I cannot develop Excel 2003 code-behind VSTO
applications if I have Office 2007 installed? I created a working
Excel 2003/VSTO document, and it worked fine within VS2008, but when I
closed the solution and re-opened in, VS2008 automatically upgraded it
to a 2007 document and it would no longer work in 2003.

For my commercial work, I need to be able to develop Office 2003
documents for users that do not have Office 2007 installed (the
majority of users).

I am thinking that I need to install a VM with Windows XP, Office 2003
only (no Office 2007), and VS2008. I'm not a big fan of VSTO to begin
with (it seems like a half-assed hack job), but the inability to
create both 2003 and 2007 code-behind documents is a fatal flaw that
renders VSTO unusable for serious, commercial development. I could
live with the restriction that you can't develop one single document
for both Office 2003 and Office 2007, but not being able to develop
Office 2003 documents at all if Office 2007 is installed is
inexcusable.

Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group, 1998 - 2009
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)
 
N

Norman Yuan

There is a NG for this type of question:
microsoft.public.vsnet.vstools.office.

Yes, you are correct, MS does not support doing VSTO project in a computer
with both Office2003 and Office2007 installed. It is explicitly described on
MS VSTO site . You have to seperate Office 2003 and 2007 in different boxes
(or use virtual machine as you thought).

Due to VSTO's requirement to Office2003 edition (it must be Office2003 Pro
or above, or stand-alone Word/Excel), I never see it is worth doing VSTO for
Office2003: most people use Office2003 standard or basic eidtion that come
with their computer as OEM bundle. So, if some of your targeting users do
not have Office2003Pro, they cannot use your VSTO Office2003 solution.
 
C

Chip Pearson

Thanks for the reply, even though it wasn't exactly what I wanted to
hear. And sorry about posting to the wrong newsgroup. I searched the
newsgroup list for everything that sounded like "VSTO" but obviously
missed the relevant group. Thanks again.


Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group, 1998 - 2009
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)
 
C

Cindy M.

Hi Chip,
I don't know if this is the right group, but I couldn't find a VSTO
group.
FWIW there's a lot more traffic in the VSTO forum, rather than the
newsgroup. And that's where the MS folks drop by, when they have a
moment.

http://social.msdn.microsoft.com/Forums/en-US/vsto/threads/
Am I
correct in assuming that I cannot develop Excel 2003 code-behind VSTO
applications if I have Office 2007 installed?
That is correct. Part of the problem is that parallel installations of
Office aren't supported by Microsoft (since Office 97 came out), even
though it's often possible. But there can be conflicts, and the last
installed version will replace some things for all versions. So there's
no guarantee that all those versions running side-by-side will work as
"out of the box". You are familiar with "DLL Hell", I'm sure :) In
order to avoid any potential conflicts, VSTO is designed to not support
parallel installations of Office.

The additional "physical" problem is how the PIAs and Office apps are
registered in the Windows Registry. When Visual Studio creates a
Reference to the Office COM type libraries, it actually creates a
reference to the PIAs for the type libraries. To do this, it looks up
the location of the PIAs in the Registry, and there only one set of PIAs
can be registered. Once you've installed Office 2007, these are the PIAs
that are picked up.
I am thinking that I need to install a VM with Windows XP, Office 2003
only (no Office 2007), and VS2008. I'm not a big fan of VSTO to begin
with (it seems like a half-assed hack job), but the inability to
create both 2003 and 2007 code-behind documents is a fatal flaw that
renders VSTO unusable for serious, commercial development. I could
live with the restriction that you can't develop one single document
for both Office 2003 and Office 2007, but not being able to develop
Office 2003 documents at all if Office 2007 is installed is
inexcusable.
Yes, a VM for each version of Office is the way to go.

However, I think there is one misunderstanding, if I'm correctly reading
this last paragraph of yours. You can developer a VSTO document-level
customization that will work with both Office 2003 and 2007. Develop it
for 2003 - it should open and run for 2007, as well. Of course, you
won't be able to use the Ribbon; you're stuck with toolbars and the
Actions Pane for the in-place UI.

Something else developers do who want to support both versions AND take
advantage of the newer things in Office 2007, is to create two separate
VSTO projects... And put the bulk of the code, that both share, into a
separate DLL that's distributed with both versions. That reduces the
code maintenance, while giving you more flexibility.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question
or reply in the newsgroup and not by e-mail :)
 

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