How to install custom template to Office STARTUP folder?

S

stealthman

It has been documented elsewhere that the correct way to install a MS Word
add-in that uses CommandBars is to set the CustomizationContext to a custom
(blank) template so as not to change Normal.dot. What I haven't been able to
find is sufficient instructions to be able to figure out how to install my
custom template properly during deployment. I'm using a standard Setup
Project in my Visual Studio 2005 Solution.

I think that the best place to install the custom template is in the Office
STARTUP folder - for a default install of Office 2003 this would be
"C:\Program Files\Microsoft Office 2003\OFFICE11\STARTUP". However, this is
not as simple as I expected. The first issue is that a user could have
installed Office somewhere other than the default location. I thought I could
handle that by using information from the registry, but I've run into a
problem there too.

My plan was to put the custom template in a Custom Folder in the File System
Editor. This Custom Folder would have the DefaultLocation property set to a
registry search from the Launch Conditions Editor (following the instructions
from the following MSDN article, "How to: Use a Registry Launch Condition to
Specify a Target Directory":
http://msdn2.microsoft.com/en-us/library/h0z89y5d(VS.80).aspx ). However, the
path for the Startup folder is not stored in the registry, only the parent
folder, and I can't figure out how to add "\STARTUP" to the DefaultLocation
property of my Custom Folder.

Am I on the right track and just missing something, or is another strategy
needed entirely?
 
S

stealthman

Figured it out:

I was mistakenly using the Name property rather than the Property property
to identify the registry searches. So, setting the DefaultLocation property
of my Custom Folder to [SEARCHFORWORD12][SEARCHFORWORD12STARTUP] works
properly now.
 

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