Solved

Where is the path to the template folder stored?

Posted on 2014-04-28
8
308 Views
Last Modified: 2014-04-29
I would like to find the path to the winword templates folder.  I guess it is in the registry but I couldn't find it with a quick search so maybe I am guessing incorrectly.

Where is this path stored?
or
How can I obtain the complete path from other information?


ps.  I don't want to know how to select a template in word - this is for another program (not word) that needs to locate the template folder.
0
Comment
Question by:AndyAinscow
  • 3
  • 3
  • 2
8 Comments
 
LVL 27

Expert Comment

by:MacroShadow
ID: 40027121
C:\Users\%UserProfile%\AppData\Roaming\Microsoft\Templates
0
 
LVL 76

Expert Comment

by:GrahamSkan
ID: 40027125
It is a Word option. Word Options> Advanced> File Locations…> User Templates

Word Options> Advanced> File Locations…> Workgroup Templates is the location for shared templates (The Normal template should not be shared)
0
 
LVL 27

Expert Comment

by:MacroShadow
ID: 40027126
Here you will find four quick methods.
0
 
LVL 44

Author Comment

by:AndyAinscow
ID: 40027199
Thanks.

@MacroShadow
C:\Users\%UserProfile%\AppData\Roaming\Microsoft\Templates
That would still leave me to find the value of %UserProfile% - and would it ALWAYS be that I ask myself?  (Not all versions of Windows are in English).

@GrahamSkan
Word Options> Advanced> File Locations…> User Templates
a small but very important excerpt from my question
this is for another program (not word) that needs to locate the template folder.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 27

Expert Comment

by:MacroShadow
ID: 40027205
%UserProfile% is a system variable, it should return the correct location regardless of the system language.
0
 
LVL 76

Accepted Solution

by:
GrahamSkan earned 125 total points
ID: 40027221
In VBA you can use
strPath = Application.Options.DefaultFilePath(wdTempFilePath)

Open in new window

0
 
LVL 76

Expert Comment

by:GrahamSkan
ID: 40027479
Just to note, that because it is an option, it can be changed (as I have done on my system), so it is not necessarily in the default default location.
0
 
LVL 44

Author Closing Comment

by:AndyAinscow
ID: 40029568
Thanks, that is close enough to achieve what I want.

wdTempFilePath - hmm, I think you meant wdWorkgroupTemplatesPath.

wdUserTemplatesPath is possibly more useful - the local templates are stored there.  The workgroup path will only return something if there is a path defined.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The Selection object is designed for user interaction. It has a Range property, so it can be used in most places that a Range object can. Recorded macros must use the Selection because they are simply copying what the user is doing. A Range prope…
Nice table. Huge mess. Maybe this was something you created way back before you figured out tabs or a document you received from someone else. Either way, using the spacebar to separate the columns resulted in a mess. Trying to convert text to t…
Learn how to make your own table of contents in Microsoft Word using paragraph styles and the automatic table of contents tool. We'll be using the paragraph styles in Word’s Home toolbar to help you create a table of contents. Type out your initial …
In a previous video Micro Tutorial here at Experts Exchange (http://www.experts-exchange.com/videos/1358/How-to-get-a-free-trial-of-Office-365-with-the-Office-2016-desktop-applications.html), I explained how to get a free, one-month trial of Office …

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now