Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Where is the path to the template folder stored?

Posted on 2014-04-28
8
Medium Priority
?
331 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 28

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 28

Expert Comment

by:MacroShadow
ID: 40027126
Here you will find four quick methods.
0
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 45

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
 
LVL 28

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 500 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 45

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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

Do you ever need to create a 20 page Word document for some testing purpose? Are you tired of copying & pasting old boring "lorem ipsum" text over and over again, increasing font size and line space in order to make the document 20+ pages long? Look…
It is often necessary in this forum and others to illustrate Word fields as text with the field delimiters replaced with the curly brackets that the delimiters resemble when field codes are being displayed on the document. This means that the text c…
In this video, we show how to convert an image-only PDF file into a PDF Searchable Image file, that is, a file with both the image (typically from scanning) and text, which is created in an automated fashion with Optical Character Recognition (OCR) …
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

926 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