Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Mail merge from inter/intranet
Where is there a good cookbook example of some code that shows a mail merge
letter with the merge data comming from an internet response page. I have an SQL database coupled with some web applications. I would like the word document to be able to complete the following tasks upon opening the document: 1. Display a dialouge box asking user to supply the record key ie: Client Id or Client Name. 2. A macro queries the SQL database via the web apps. (a web app would be provided to receive the key, then search and return the data/record to be merged) 3. The macro would continue complete the mail merge. This is fairly easy to do in excel and I see it is easy to just specify a URL in the open file dialouge box, the problems comes with merging the returned data with the document. |
#2
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Mail merge from inter/intranet
It does not really sound like and application for mailmerge. Maybe the
information in the following article will help "Access a database and insert into a Word document the data that you find there" at: http://www.word.mvps.org/FAQs/InterD...DataFromDB.htm -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP "Claus" wrote in message ... Where is there a good cookbook example of some code that shows a mail merge letter with the merge data comming from an internet response page. I have an SQL database coupled with some web applications. I would like the word document to be able to complete the following tasks upon opening the document: 1. Display a dialouge box asking user to supply the record key ie: Client Id or Client Name. 2. A macro queries the SQL database via the web apps. (a web app would be provided to receive the key, then search and return the data/record to be merged) 3. The macro would continue complete the mail merge. This is fairly easy to do in excel and I see it is easy to just specify a URL in the open file dialouge box, the problems comes with merging the returned data with the document. |
#3
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Mail merge from inter/intranet
Thanks Doug,
I guess what I was really asking can Word use information from an HTML page as source data for a mail merge. If that is not possible, is it then possible for Word to run an Excel query upon opening and then use the results from that query as the source for the mail merge (without the user seeing the excel execution). I know I can do an Excel query, because I have several application doing that. I also have several web applications that query the database then create a .txt file which the user is then prompted to download. These .txt files are then used as the source data for the mailmerge. The user has to download the file to a specific location on the their C: drive so the Word template knows the data is there. Also, subsequent queries have to overwrite the previous file with the new information. That leads to a couple of obvious problems ie: the user downloads to an incorrect location and if it is the first time the Word template crashes or worse if it not the first time, the previous query is merged and user may not notice. My quest is to eliminate the middle man so to speak. By opening the Word document with a query on the database. Retrieve the correct data and complete the merge. Keep in mind this is not a public web site, it simply used so our varied office locations can use their web browsers to access the data. So we have simmply moved our database applications to the web. I know I can specify an URL in the file open dialouge box, because I have done it. Now if that URL is a web application that queries the data base and bring back a table with the record needed. Can that be used as a source for a Mailmerge? And secondly can I add a parameter to that query? That's the quest! Claus "Doug Robbins - Word MVP" wrote: It does not really sound like and application for mailmerge. Maybe the information in the following article will help "Access a database and insert into a Word document the data that you find there" at: http://www.word.mvps.org/FAQs/InterD...DataFromDB.htm -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP "Claus" wrote in message ... Where is there a good cookbook example of some code that shows a mail merge letter with the merge data comming from an internet response page. I have an SQL database coupled with some web applications. I would like the word document to be able to complete the following tasks upon opening the document: 1. Display a dialouge box asking user to supply the record key ie: Client Id or Client Name. 2. A macro queries the SQL database via the web apps. (a web app would be provided to receive the key, then search and return the data/record to be merged) 3. The macro would continue complete the mail merge. This is fairly easy to do in excel and I see it is easy to just specify a URL in the open file dialouge box, the problems comes with merging the returned data with the document. |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Mail Merge Word 2003 Issue | Mailmerge | |||
Mail Merge Losing Data | Mailmerge | |||
Mail Merge - Parameter prompts twice... | Mailmerge | |||
mail merge with attachments | Mailmerge | |||
Mail Merge Issue With Office 97 - Excel Data Source | Mailmerge |