Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / December 2006

Tip: Looking for answers? Try searching our database.

Installing a .dotm versus a .dot

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Gary Hillerson - 25 Dec 2006 21:51 GMT
I've now got two versions of a template: one with a ribbon tab for
Word 2007 (.dotm) and one with a commandbar menu for Word 2003 and
earlier.

I've decided that for ease, I'll just install both versions when
someone downloads the template.

However, one thing my installer does is create an entry in the start
menu that points to the installed template, so the user can simply
click in the start menu to start a new document based on my template.
So now I'd like to figure out where that start menu entry should point
-- to the Word 2003/earlier .dot version, or to the Word 2007 .dotm
version.

I can ask in the installer, but I'd prefer to figure it out by
querying the registry during installation. Is there a reliable
registry query I can make to determine if the user is using 2007?

thanks in advance,
   gary
Jay Freedman - 25 Dec 2006 22:25 GMT
Look for
HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Word

You can step through the values 8.0 (for Word 97) through 12.0 to see
what's the latest installed version. Note that upgrades usually leave
some of the keys from previous versions, which may or may not still be
present.

--
Regards,
Jay Freedman
Microsoft Word MVP        FAQ: http://word.mvps.org

>I've now got two versions of a template: one with a ribbon tab for
>Word 2007 (.dotm) and one with a commandbar menu for Word 2003 and
[quoted text clipped - 16 lines]
>thanks in advance,
>    gary
Bob   Buckland ?:-) - 26 Dec 2006 17:10 GMT
Hi Jay,

I think the search may need to go for a more specific subkey/DWord?
That key is present even on a Win2000 system that has the Office 2007 compatability pack converters installed to use the .docx/.docm
files (although the converters don't work with .dotm templates).

=================
Look for
HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Word

You can step through the values 8.0 (for Word 97) through 12.0 to see
what's the latest installed version. Note that upgrades usually leave
some of the keys from previous versions, which may or may not still be
present.

--
Regards,
Jay Freedman
Microsoft Word MVP >>
Signature


Bob  Buckland  ?:-)
MS Office System Products MVP

 *Courtesy is not expensive and can pay big dividends*

Cindy M. - 26 Dec 2006 20:37 GMT
Hi Bob/Jay/Gary,

> I think the search may need to go for a more specific subkey/DWord?
> That key is present even on a Win2000 system that has the Office 2007 compatability pack converters installed to use the .docx/.docm
> files (although the converters don't work with .dotm templates).

The better place to start in the Registry is the HKCR. Look for the Word.Application
entry, where you can pick up the CurVer. And if you need to path to the exe file, the
clsid, which you can search to get that information.

Note that this isn't full-proof: if another (earlier) version of Word has registered
itself as the "default". An alternate approach would be to loop through all entries
that start with Word.Application and compare what follows. If Word 2007 is installed,
then there should be an entry with .12

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 :-)
Jay Freedman - 26 Dec 2006 21:51 GMT
Good points all. I wasn't aware of the compatibility pack's entry --
this laptop doesn't have the pack installed.

Gary, in case Cindy's instructions are a little terse for you, this is
the long version:

Under HKEY_CLASSES_ROOT, you'll find the key Word.Application\CurVer.
The unnamed (Default) entry in this key will have a value of
Word.Application.11 or Word.Application.12 or whatever. This gives you
the version of Word currently registered to handle Word documents.
This may or may not be the latest version of Word installed on the
machine.

To find the path to the Winword.exe file, get the value of the Default
entry under the Word.Application\CLSID key, which will be a GUID; and
then find the key under HKEY_CLASSES_ROOT\CLSID whose name is that
GUID, look in the LocalServer32 subkey under that, and read the
Default value to get the path.

Also under HKEY_CLASSES_ROOT, you'll find keys like
Word.Application.11 and Word.Application.12, and you can shuffle
through those to find the highest version number among them. This will
tell you the latest installed version, regardless of which is the one
currently registered.

--
Regards,
Jay Freedman
Microsoft Word MVP        FAQ: http://word.mvps.org

>Hi Bob/Jay/Gary,
>
[quoted text clipped - 19 lines]
>This reply is posted in the Newsgroup; please post any follow question or reply in
>the newsgroup and not by e-mail :-)
Gary Hillerson - 27 Dec 2006 04:59 GMT
THANKS ALL. Everything makes sense, and I now know what to do in the
installer.

Gary

>Good points all. I wasn't aware of the compatibility pack's entry --
>this laptop doesn't have the pack installed.
[quoted text clipped - 20 lines]
>tell you the latest installed version, regardless of which is the one
>currently registered.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.