templates and inserting text

A

aponce

Does anybody know if it's possible to create a word
template that when you open the template it automatically
reads a specific formatted file and inserts text from the
file into different sections of the template.
Kind of like embedding functions within the template to
look for certain informantion on the text file. This way
I'll end up with a document already formatted to the
template and the next time I want to create another
document all I need to do is modify the text file and re-
run the template.

Thank ypu
 
D

Doug Robbins - Word MVP

Hi aponce,

Sounds like you could use mailmerge with just one record in the datasource.

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
 
J

Jezebel

Yes it's possible. If your template has a macro called AutoNew, that
template will run whenever you create a new document from the template. The
macro can do whatever you're capable of writing code for: reading a text
file and inserting the text into the document is straightforward.
 
C

Charles Kenyon

Another option is to use an INCLUDETEXT field. If your file is multiple
paragraphs I'm not sure how the formatting would work on a text file, but
you could give it a try.

Set up a style to handle your formatting and apply it to the field. The
Insert => Field dialog will probably insert a MERGEFORMAT control for you.
If it does, change this to a CHARFORMAT control.
--

Charles Kenyon

See the MVP FAQ: <URL: http://www.mvps.org/word/> which is awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.
 

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