Solved

Where is the path to the template folder stored?

Posted on 2014-04-28
8
311 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
Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
VBA for word, remove/delete entire page if it is empty 4 26
Excel Spreadsheet in a Word 2016 document. 3 57
Word 2016 Search Comments 5 39
Office 365 home questions 7 65
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…
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…
This video walks the viewer through the process of creating a watermark for their document, customizing it, and saving it for viewing/printing needs.
This video teaches the viewer how to align pictures around text while keeping the text properly aligned in the document.

816 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

8 Experts available now in Live!

Get 1:1 Help Now