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

Mail Merge ASP recordset to MS Word

Status
Not open for further replies.

Ammodog

Technical User
Dec 13, 2002
97
0
0
US
I have been able to create a new MS Word document with the recordset but does anyone know how to mail merge that recordset to an existing MS Word template? I have a set of forms that has to be set up with the type of paper and margins.. I can do this in word but I have a multi user web app and would like them to be able to pull that merged document. Any Suggestions?

Christopher Abney
There is no limit to the good you can do if you dont care who gets the credit
 
Word mailmerge function needs direct/LAN access to the database so, unless your web project is running on a local area network I don't think you will succeed.

There are, though, some commercial packages which may do so; for instance you may download a trial version of WordWriter from


Cheers

QatQat

Life is what happens when you are making other plans.
 
You gotta be careful about starting Word on the server using ASP because you can end up with situations where the ASP terminates abnormally and winword.exe is left running in the server's memory chewing up resources but doing nothing.

One way to sort of approximate a mailmerge is to use a document full of "bookmarks", you can then create an instance of the Word "Application" object, open the .DOC and get a reference to the .Bookmarks collection. Then you can write a loop within a loop where the outer loop spins through your recordset and the inner loop does a For-Each/Next on the Bookmarks collection. Thats pretty messy and also then you've got the issue of where you want to save these files onces you've created them.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top