Mail Merge Automation

C

Chris Hoare

I need to do a mail merge letter for a generated contract. The letter basically comes in two parts :

1 ) Standard letter bits - dear so and s
2 ) n Lines of contract specific informatio

The data is being supplied over the web and needs to be fairly simple for the end user to understand (as they will want to be able to modify the contracts without calling me for XSLT changes ...

At the moment i output a table to disk; using word active x on teh client pc, and then import that to a template which is downloaded from the webserver. I am open to any suggestions because i am fresh out of ideas how to accomplish this now... (Have tried two documents and an ole embed which is force updated on merge xslt and a second merge to the file.

The ole merge seemed to be a good idea; but in practice gave me issues
 
S

Steve Culhane [MS]

You can find an quick sample that automates Word from VB to do a mail merge
at the following link.

220607 HOWTO: Automate Microsoft Word to Perform Mail Merge from Visual
Basic
http://support.microsoft.com/?id=220607

I would look closely at the CreateMailMergeDataFile Sub in the sample in
this KB Article. If you're sending a data file to the client, you can have
them read that data in and create the DataDocument on their side by reading
the data file you send them from the WEB Server. In that situation you'll
be modifying the CreateMailMergeDataFile SUB.

From what you wrote in the last thread, I believe the client is running the
mail merge from their PC, and that you send them the data they enter or
modify in a file that they download from the WEB Server. I also understand
that you are sending them a template Word MailMerge Document in the same
way. But it sounds like you are creating the Word MailMerge document on
the server side. If you are, you don't want to do this. If you need to
generate the MailMerge Document you want to do that on the client side as
well. KB Article 257757 goes into some of the details of why you would not
want to automate word from the server side. Here's a link to that article.

257757 INFO: Considerations for Server-Side Automation of Office
http://support.microsoft.com/?id=257757

If you have no choice and have to create the document on the server side
you may want to create an RTF File and do the MailMerge there. Then you
could have the client download the RTR File, which they would open in Word.
Here's a quick sample of how to create an RTF File using an ASP Page.

270906 HOWTO: Use ASP to Generate a Rich Text Format (RTF) Document to
Stream
http://support.microsoft.com/?id=270906


Let me know if this does the trick.


Stephen Culhane
(e-mail address removed)
Microsoft Developer Support

This posting is provided "AS IS" with no warranties, and confers no rights.





--------------------
| Thread-Topic: Mail Merge Automation
| thread-index: AcP1/QzmsOd5GjLXRP2THmV/LIMzMg==
| X-Tomcat-NG: microsoft.public.office.developer.automation
| From: "=?Utf-8?B?Q2hyaXMgSG9hcmU=?=" <[email protected]>
| Subject: Mail Merge Automation
| Date: Wed, 18 Feb 2004 00:56:08 -0800
| Lines: 12
| Message-ID: <[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.office.developer.automation
| Path: cpmsftngxa07.phx.gbl
| Xref: cpmsftngxa07.phx.gbl
microsoft.public.office.developer.automation:8427
| NNTP-Posting-Host: tk2msftcmty1.phx.gbl 10.40.1.180
| X-Tomcat-NG: microsoft.public.office.developer.automation
|
| I need to do a mail merge letter for a generated contract. The letter
basically comes in two parts :

1 ) Standard letter bits - dear so and so
2 ) n Lines of contract specific information

The data is being supplied over the web and needs to be fairly simple for
the end user to understand (as they will want to be able to modify the
contracts without calling me for XSLT changes ...)

At the moment i output a table to disk; using word active x on teh client
pc, and then import that to a template which is downloaded from the
webserver. I am open to any suggestions because i am fresh out of ideas how
to accomplish this now... (Have tried two documents and an ole embed which
is force updated on merge xslt and a second merge to the file.)

The ole merge seemed to be a good idea; but in practice gave me issues


|
 
C

Chris Hoare

Steve

Thanks for teh reply. Everything is client side; its a web delivered application it just uses server side templates / data
I had really considered and rejected RTF as an option as it doesnt deliver anything more than XSLT does - i.e. it is still only developmer modifiable not end user modifiable.

I need to have an area in the document with N records inside it as well as the normal mail merge elements. As far as i can see this isn't possible with word mail merge outside of generating the wordml or rtf from scratch; my goal was to have a non technical user able to maintain teh templates etc without pestering me
 
S

Steve Culhane [MS]

It sounds like you need to have an adhoc mail merge document, where the end
user can modify the document, add paragraphs and data elements, followed by
a submission to the server to supply the data. The main requirement is
that the end user should not need to have any experience with mail merges.

If this is so, I don't believe you will be able to accomplish this goal.
Over the years I have herd many people make request for totally AdHoc
Reporting tools, where the enduser would not need to know anything about
computers. Unfortunately the obstacles that arise from such a request are
endless. In the end my business partner really needed to define the report
they wanted to generate, as well as the data elements the wanted to filter
on.

In some situations, I have in the past used place holders for custom
paragraphs, that the end-user would type and save in a database. These
paragraphs would be displayed in predefined areas of a report. If the
users didn't supply a paragraph, then the document would be shorter. Is
this the type of solution you are looking for in this situation? This
sounds more like an adhoc report with custom paragraphs, in addition to the
normal data elements.

If I have misunderstood what you need to accomplish please let me know, so
I can serve you better.


Stephen Culhane
(e-mail address removed)
Microsoft Developer Support

This posting is provided "AS IS" with no warranties, and confers no rights.






--------------------
| Thread-Topic: Mail Merge Automation
| thread-index: AcP56i5b1Fc+BRzDRpaS9S4a4BXBmg==
| X-Tomcat-NG: microsoft.public.office.developer.automation
| From: "=?Utf-8?B?Q2hyaXMgSG9hcmU=?=" <[email protected]>
| References: <[email protected]>
<[email protected]>
| Subject: RE: Mail Merge Automation
| Date: Mon, 23 Feb 2004 00:51:09 -0800
| Lines: 8
| Message-ID: <[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.office.developer.automation
| Path: cpmsftngxa06.phx.gbl
| Xref: cpmsftngxa06.phx.gbl
microsoft.public.office.developer.automation:8485
| NNTP-Posting-Host: tk2msftcmty1.phx.gbl 10.40.1.180
| X-Tomcat-NG: microsoft.public.office.developer.automation
|
| Steve,

Thanks for teh reply. Everything is client side; its a web delivered
application it just uses server side templates / data.
I had really considered and rejected RTF as an option as it doesnt deliver
anything more than XSLT does - i.e. it is still only developmer modifiable
not end user modifiable.

I need to have an area in the document with N records inside it as well as
the normal mail merge elements. As far as i can see this isn't possible
with word mail merge outside of generating the wordml or rtf from scratch;
my goal was to have a non technical user able to maintain teh templates etc
without pestering me !


|
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top