Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Johnny E. Jensen Johnny E. Jensen is offline
external usenet poster
 
Posts: 1
Default MailMerge an Dataset

Hello NG

I have a DataSet containing only one table - but unknown rows in that table.
The DataSet is made using VB.NET

Now, is it possible to use that dataset to first design a template (dot or
dotx) containing mailmerge fields from the dataset.datatable.fields and
there after using the template to merge data from the dataset to the
mailmerge document.

Kind regards

Johnny Jensen

  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default MailMerge an Dataset

To use the built-in mailmerge you have to connect to one of several
types of data source - either a "file" such as a .doc(x), .txt etc., or
a "server" via DDE, ODBC or OLE DB. Unless you have the capability to
connect to your data source via one of those methods - e.g. if you can
persist it to a disk file that MailMerge can work with - you can't
really use the built-in mailmerge.

However, since you are already working with VB.NET you may be able to do
what you want in other ways - if you only have to work with word 2007
and later, one way is
a. create a custom XML part
a. put content controls, linked to that part, in the document
b. populate the custom XML part with data.

There's a two-part example starting at

http://blogs.msdn.com/erikaehrli/arc...tionPart1.aspx

I have never personally used this approach but think it is roughly the
direction Microsoft intended merge-type applications to go if they
cannot be done with the out-of-the-box facilities.


Peter Jamieson

http://tips.pjmsn.me.uk

On 05/01/2010 11:41, Johnny E. Jensen wrote:
Hello NG

I have a DataSet containing only one table - but unknown rows in that
table.
The DataSet is made using VB.NET

Now, is it possible to use that dataset to first design a template (dot
or dotx) containing mailmerge fields from the dataset.datatable.fields
and there after using the template to merge data from the dataset to the
mailmerge document.

Kind regards

Johnny Jensen

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 from C# using DataSet as datasource Sparre Mailmerge 3 February 7th 10 10:36 AM
Mailmerge Help Fred Mailmerge 12 August 17th 08 11:25 PM
MailMerge and VBA User[_2_] New Users 3 December 18th 07 04:58 AM
Is Mailmerge the best for what I'm trying to do???? rbecker Mailmerge 1 July 12th 07 06:58 AM
Can I do a Mail Merge in Word from a DataSet as the data source? lanem Mailmerge 1 April 22nd 05 02:31 PM


All times are GMT +1. The time now is 08:29 AM.

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"