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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

pass records to existing ms word mailmerge document

Status
Not open for further replies.

honeypot

Technical User
Mar 6, 2001
147
GB
ive created a mail merge document (in ms word 2003) that uses all the necessary fields from my database. What i need to do next with my windows form is when the user clicks on the mailmerge button, all records that require an acknowledgment letter will be pushed through to this existing mail merge document.
Pls help??
 
hi..this is pretty easy

write a routine to export the data items u want with header descriptions to a regular txt file..

for e.g.

MyFieldA,MyFieldB
1,2

in a file a.csv

open some a.doc and make it a mail merge document..

ull choose a.csv as its source..and u can actually drop the 2 fields anywhere in the word document..

u save this document..

the next time u shud actually write the routine from vb itself..which opens this word document directly (using shellexecute)..and voila..ur new info is wher u want it in the word file

bye:)
 
hi :) thanks very much, but could u pls be a little more specific as im very new to this? maybe example code?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top