MS Office naming conventions

B

B. Chernick

I have a potential programming problem and I'm looking for some background
info.

I'm looking at the subdirectories of 'Program Files\Microsoft Office' and
I'm wondering what the 'big picture' is, as far as naming conventions is
concerned. More specifically, I'm looking at Office, Office10, Office11, and
Office12 sub-directories. Are these standard names? More confusingly, I
installed MS Project 2000 on top of a system that already had Project 2003,
yet 2000 is in Office while Project 2003 is in Office11.

My specific problem is that I am working on a Dot Net 2.0 Winforms app that
needs to launch Project. I have successfully launched Project 2003 using a
shell (with a literal full file path) and a getobject, but I'm wondering how
many of the machines in our organization might have both versions of Project
installed. (and how flexible the program needs to be.)
 
J

Jack Dahlgren

I do not believe you should rely on the path names.
Have you tried alternatives such as getobject?

-Jack Dahlgren
 
B

B. Chernick

Actually it's interesting you would bring that up because that's my new
problem.

I'm working under the assumption that a direct interop declaration cannot
distinguish between 2 versions of project and will just load the last
installed.

So, following another forum member's suggestion, I changed my code to the
following:
Shell("c:\Program Files\Microsoft Office\Office11\winproj.exe")
aApp = GetObject(, "MSProject.Application")

So first, how do I avoid using literal paths? (I've done virtually nothing
in this style before, working with Office objects I mean)

Second and more importantly, why is GetObject returning System.__ComObject,
what is System.__ComObject, and how do I turn it into something useful like
an MSProject Application object? I've spent half the morning googling it
and I'm more confused than ever.
 
J

Jim Aksel

Although I don't have the reference here, you can learn the install path of
the program from examining the registry keys on the machine. So, you'd read
the registery to learn the path, then use that.

Although most people use default folders, some do not. If you hard code the
path you will eventually have a problem.
--
If this post was helpful, please consider rating it.

Jim

Visit http://project.mvps.org/ for FAQs and more information
about Microsoft Project
 
B

B. Chernick

I'm beginning to think I'm making a mountain out of a molehill. Might be
simpler to just use the basic interop declaration and declare that this app
can only be used with machines that have 2003 and only 2003 installed.

(Of course there will be always be one manager who just installed Project
1900 because he can't live without the parchment interface.)
 

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