Group:  Microsoft Word ยป microsoft.public.word.mailmerge.fields
Thread: Multiple Data Sources on a single form

Geek News

Multiple Data Sources on a single form
dsquared <don[ at ]mitecwv.com> 5/1/2007 1:05:19 AM
Please forgive me, but I'm new to using Mail Merge.
I was wondering if it is possible to use more than one data source in
a single document. For instance an envelope. I want to pull the
information for the recipients from one sql server table, and the
return address from another table in the same database.

Any help in pointing me in the right direction would be greatly
appreciated.

Re: Multiple Data Sources on a single form
"Peter Jamieson" <pjj[ at ]KillmapSpjjnet.demon.co.uk> 5/1/2007 6:37:17 AM
A mailmerge can only have one data source in the sense that it is usually
understood within Word Mailmerge.

However,
a. that data source can be a view, which uses a join to bring together
related data from multiple tables and views. as long as there is something
to link each recipient with the appropriate return address you should be
able to combine the two sets of information in a view
b. if you aren't allowed to create a view in your database, you can issue
the equivalent SELECT statement from Word VBA. However, your query is
limited to around 255 or 511 characters, and that can be a significant
limitation
c. you can sometimes insert pieces of information that come from other
sources of data using DATABASE fields. However, before going down that route
you should really try out (a). If you're not familiar with SQL and views,
tell us a little bit about the structure of the tables you need to get the
data from and maybe we'll be able to make some suggestions, or you could try
asking in a more SQL-related group.

Peter Jamieson


"dsquared" <don[ at ]mitecwv.com> wrote in message
news:1177981519.620095.98470[ at ]q75g2000hsh.googlegroups.com...
[Quoted Text]
> Please forgive me, but I'm new to using Mail Merge.
> I was wondering if it is possible to use more than one data source in
> a single document. For instance an envelope. I want to pull the
> information for the recipients from one sql server table, and the
> return address from another table in the same database.
>
> Any help in pointing me in the right direction would be greatly
> appreciated.
>


Re: Multiple Data Sources on a single form
dsquared <don[ at ]mitecwv.com> 5/2/2007 1:50:35 PM
On May 1, 2:37 am, "Peter Jamieson" <p...[ at ]KillmapSpjjnet.demon.co.uk>
wrote:
[Quoted Text]
> A mailmerge can only have one data source in the sense that it is usually
> understood within Word Mailmerge.
>
> However,
> a. that data source can be a view, which uses a join to bring together
> related data from multiple tables and views. as long as there is something
> to link each recipient with the appropriate return address you should be
> able to combine the two sets of information in a view
> b. if you aren't allowed to create a view in your database, you can issue
> the equivalent SELECT statement from Word VBA. However, your query is
> limited to around 255 or 511 characters, and that can be a significant
> limitation
> c. you can sometimes insert pieces of information that come from other
> sources of data using DATABASE fields. However, before going down that route
> you should really try out (a). If you're not familiar with SQL and views,
> tell us a little bit about the structure of the tables you need to get the
> data from and maybe we'll be able to make some suggestions, or you could try
> asking in a more SQL-related group.
>
> Peter Jamieson
>
> "dsquared" <d...[ at ]mitecwv.com> wrote in message
>
> news:1177981519.620095.98470[ at ]q75g2000hsh.googlegroups.com...
>
>
>
> > Please forgive me, but I'm new to using Mail Merge.
> > I was wondering if it is possible to use more than one data source in
> > a single document. For instance an envelope. I want to pull the
> > information for the recipients from one sql server table, and the
> > return address from another table in the same database.
>
> > Any help in pointing me in the right direction would be greatly
> > appreciated.- Hide quoted text -
>
> - Show quoted text -

Thanks so much Peter. Creating a view worked great.

Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net