Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Claus
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Claus
 
Posts: n/a
Default 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

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mail Merge Word 2003 Issue S.Nicks Mailmerge 5 February 20th 09 01:55 AM
Mail Merge Losing Data Scott May Mailmerge 1 November 1st 05 11:03 PM
Mail Merge - Parameter prompts twice... TL Mailmerge 6 June 17th 05 02:58 PM
mail merge with attachments AS Mailmerge 5 April 9th 05 09:49 AM
Mail Merge Issue With Office 97 - Excel Data Source Matt Thorley Mailmerge 1 February 15th 05 11:38 PM


All times are GMT +1. The time now is 12:32 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"