adding new document when macro starts Word 97

B

BRC

I have a macro that writes a letter when it runs. I would like to add (open)
a new document each time the macro runs. I am using Word 97. Thanks for any
help
 
M

Mark Tangard

BRC,

Without seeing the macro I can't be 100% sure how it does what
it does, but most likely you can do this by putting the line:

Documents.Add

at the top of the macro.

Note that this launches a new doc based on your normal template.
If this macro spews out a pile of text directly from its code,
chances are you'd be better off placing that text *in* a new
template. Making permanent updates would be a lot easier, and
your macro itself would be smaller and run faster. It's quite
possibe it could consist of just a single line of code:

Documents.Add Template:="C:\Path\[-etc-]\MyTemplate.dot"

For the basics on creating a template, see:
http://www.mvps.org/word/FAQs/Customization/CreateATemplatePart1.htm
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top