![microsoft word templates location microsoft word templates location](http://www.addbalance.com/usersguide/images/TemplatesFileNewDialog10.jpg)
(If we don’t do that, an invisible instance of Word will continue running in the background.)Īnd now that people know about the scripts for managing Microsoft Office, we do one other thing: sit back and wait for fame and fortune to roll in. Immediate download access to all supported Microsoft Office file formats: Microsoft Word (.docx) Microsoft Publisher (.pub) Microsoft PowerPoint (.pptx) Microsoft Office 365 Layouts for both U.S. We change the file locations and then use the Quit method to close Word. That’s all we have to do we don’t even need to call a Save function of any kind.
![microsoft word templates location microsoft word templates location](https://cdn.extendoffice.com/images/stories/doc-word/open-template-location/open-template-location-1.png)
For example, to change the User Templates path to C:\Templates we use this line of code: objOptions.DefaultFilePath(wdUserTemplatesPath) = “C:\Templates”Īnd to change the Workgroup Templates path to C:\Workgroup\Templates we use this line of code: objOptions.DefaultFilePath(wdWorkgroupTemplatesPath) = “C:\Workgroup\Templates” To change a file path all we need to do is change the value of the DefaultFilePath property, making sure to use one of our constants to indicate which file path we want to change. That’s because we don’t want Word to be visible onscreen we want to open up Word in an invisible window, make our changes, and then close Word without anyone seeing a thing. You might notice in this script that we don’t set the Visible property to True like we do in most of our sample scripts. We then create an instance of the Word.Application object as well as its child object, Options. These templates will then be available through the General tab of the New dialog box. There are a number of other file locations that can be changed using a script for a complete list (and for the constants and their associated values) see the wdDefaultFilePath enumeration in the Microsoft Word VBA Language Reference on MSDN. You can use Word to set the location of Workgroup templates (e.g., on a network drive). We begin by defining a pair of constants – wdUserTemplatesPath and wdWorkgroupTemplatesPath – that we’ll use to indicate the file locations we want to change. ObjOptions.DefaultFilePath(wdUserTemplatesPath) = “C:\Templates”
![microsoft word templates location microsoft word templates location](https://images.template.net/wp-content/uploads/2019/09/Product-Launch-Proposal-Template.jpg)
Set objWord = CreateObject(“Word.Application”) Or more.Īs for changing the file locations for User Templates and Workgroup Templates, well, this script ought to do the trick: Const wdUserTemplatesPath = 2 And if you see some 15-year-old kid nosing around there, remind him that his Scripting Dad is in tip-top shape and will probably live for another 100 years. If you’re looking for scripts that carry out administrative tasks for Microsoft Office be sure to check out the Scripting for Office center. That’s why we decided to do this brief infomercial before answering our question. It’s like that great, undiscovered novel in the attic: if something were to happen to this Scripting Guy, the Scripting Heir would inherit all those scripts. Few people seem to use these, yet tons of people ask how they can write scripts for managing Microsoft Office.
Microsoft word templates location how to#
The Script Center actually has a number of scripts available in the Scripting for Office center that show you how to carry out administrative tasks such as changing file locations. This same Scripting Guy has a similar fear regarding scripts for managing Microsoft Office.