Word Field Merge

D

david

Hi,

I need to merge some fields of a Word document with data from SQl Server.
How I can do it in ASP .NET (VB .NET).

Thanks in advance for your help
 
C

Cindy M -WordMVP-

Hi David,
I need to merge some fields of a Word document with data from SQl Server.
How I can do it in ASP .NET (VB .NET).
I'm afraid your question is stated rather generally/vaguely. Do you mean
mail merge? With which version of Word?

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Sep 30 2003)
http://www.mvps.org/word

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :)
 
D

david

Hi Cindy,

in fact, I need to do a mail merge with Word 97, Word 2000, Word XP from an
ASPx page.
I have read that it is better to do a mail merge on the client side with a
VB Script.
But I don't know :
- if is it better to create word documents with a macro which run the mail
merge during the opening of the document
- or if I have to do the mail merge from a VB Script inside Internet
Explorer (in this case, I don't know how I can do that)

Thanks for your help

David
 
C

Cindy M -WordMVP-

Hi David,

Either way would work. You'd need to keep the macro security aspect in mind
if you include macro code in a Word document, however. So unless you have
control over this (such as using a digital signature and being sure all the
users will recognize it as a trusted source), I'd say go for the automation
using Script.

Unfortunately, I can't tell you how to do that, although I'm sure someone in
a Scripting group could. Once you know how to automate Word from script, I
could help you with the actual Word code it would require. But you'd need to
detail the steps...

Quite a few things you can get a start on by using the Macro Recorder. For
this project you may also need to branch your code based on whether you're
dealing with Word XP or an earlier version (just a warning).
in fact, I need to do a mail merge with Word 97, Word 2000, Word XP from an
ASPx page.
I have read that it is better to do a mail merge on the client side with a
VB Script.
But I don't know :
- if is it better to create word documents with a macro which run the mail
merge during the opening of the document
- or if I have to do the mail merge from a VB Script inside Internet
Explorer (in this case, I don't know how I can do that)

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Sep 30 2003)
http://www.mvps.org/word

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :)
 

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