Hi Cassandra,
One way you can do this is to purchase WinZip Self Extractor. This is not
the same as
WinZip. It's an add-on package that lets you automatically run a DOS command
after self-extraction takes place. It is pretty economical. I don't recall
the exact price.
Basically, here's what to do:
1. Create a document called Setup.doc that contains the following macro
Sub AutoNew()
FileCopy ActiveDocument.Path & "\[TemplateName].dot",
Application.Options.DefaultFilePath(wdStartupPath) & "\[TemplateName.dot"
End Sub
Save this document and your template into the same folder.
2. In Windows Explorer, select your template plus the document called
Setup.doc and
NOTHING ELSE. (Specifically, make sure to NOT select the folder that these
two items are in. If you select the folder, this approach won't work.)
3. Right-click one of the selected items and choose Send to Compressed
Folder. Or you could run regular WinZip and compress the two items that way.
4. Start up WinZip self extractor and follow the Wizard prompts.
WinZip self-extractor will ask you a couple of things along the way. For
example, it will ask you to choose what type of file you're trying to
create. Ironically, one of the choices is Software Installation file. Do NOT
choose this option. That would be too easy! Choose the other option instead,
which I think is called regular self extracting file.
You'll also be asked for a folder to unzip to. This is important. You can
leave this item blank but in that case the exe file will extract to your
Windows temp folder and this won't work. So be sure to specify a folder.
When asked what command you want to run, enter ".\Setup.doc"
Since the extractor sets the windows current directory to the destination
folder of the extraction, the result of this command is for Windows to
launch Word (thanks to Windows file association) and pass to it the setup
document.
Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.
Hope this helps
Doug Robbins - Word MVP
Cassandra Thompson said:
I am interested in an answer to this to.
However the article mentioned really applies to someone in an IT department
distributing to a firm.
But what if (and I am guessing the original author was meaning this) the
macro is written to be distributed externally.
ie. I am in the process of writing a macro collection that I would like to
sell. I understand how templates work, and would like to be able to setup an
installation routine that takes my template (containing the macros) and
determines what folder is the word startup folder on the user system, and
then place the template in that folder.
Is this possible?
Thanks,
Cassandra
"Doug Robbins - Word MVP - DELETE UPPERCASE CHARACTERS FROM EMAIL ADDRESS"