FIGURE 17.14
A success message after copying the template to the User Templates path.
If the copy could not be done, because Test.dot could not be located in the current folder, you will
instead get the message shown in Figure 17.15.
FIGURE 17.15
A message indicating that the template to be copied could not be found.
When you open the MSE, you may see a script open in the code pane, and other scripts
listed in the Project Explorer; these are the scripts that were recently opened. If you see
the script you want to edit in the Project Explorer, just select it.
The text of CopyTemplateUser.vbs is listed next. There are several commented-out MsgBoxstate-
ments in this script; if you want to display these message boxes, uncomment these lines by remov-
ing the apostrophe at the beginning of the line:
Dim strTemplate
Dim strUserTemplatePath
Dim appWord
Dim fso
Dim strScriptPath
Dim strScriptName
Dim strScriptNameAndPath
Dim fil
Dim strPrompt
Dim strTemplatePath
strScriptName = WScript.ScriptName
NOTENOTE
Creating Standalone Scripts with Windows Script Host 17