Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Advice needed - Best way to fill out a word template

Status
Not open for further replies.

Greni

IS-IT--Management
Jan 12, 2005
3
DK
Hi

Need an advice

What is the best way to fill out variables when opening
a word document/template from Access.

Use vba code in word template or acces. eg replace variable names with data?

Writing data to file and open mail merge document

other solutions or any samples available some where?

Thanks in advance

SG/Denmark



 
I use VBA code in Access to set variables (bookmarks) in Word.
That works without problem.
 
Greni,

After spending some time looking at this I'd suggest two methods; Bookmarks & Find/Replace.

Bookmarks are great for simple letters where the data is to transferred to one location within the document. For more locations you'll need to set REF fields to that bookmark in your Word template and update those fields after inserting the bookmark text. Found Word treatment of formatting these fields is a bit of a handful, and updating fields in various locations (like footers & headers) difficult with complex documents.

Find/Replace is slightly slower but works great across large documents and where data is to transferred to multiple locations. Downside here is documented at
 
Thanks both

I'll look into the bookmarks.

SG/Denmark
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top