Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
vaitrafra vaitrafra is offline
external usenet poster
 
Posts: 2
Default Word Mail Merge and Word Tables.

Hi all,
I searched the web but it seems i can't find my answer.

I'm trying to populate a table via mail merge.

It's the common situation of a commercial quote where in the first MM record
you wnat to print the headline with addresses etc. and from the second record
to the end you have to print out a product table with descriptions and prices.
I cant find a way to tell to MM to populate the table consequentially,
without creating an entire new table for each record but advancing to a new
row at every one (like pressing tab in the last cell of the row).

Thanks.

P.S. I know that's the worst english ever, but i'm italian, cant help it.

  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
macropod[_2_] macropod[_2_] is offline
external usenet poster
 
Posts: 2,059
Default Word Mail Merge and Word Tables.

See: http://support.microsoft.com/?kbid=211303
Note that the field code construction in that article results in an extra line being inserted between records if the data source is
an Excel workbook.

The following (simpler) field coding eliminates the unwanted extra lines from the first example:
{QUOTE{IF{MERGESEQ}= 1 {SET Place ""}}"{IF{MERGEFIELD City} {Place} "{IF{MERGESEQ}= 1 "" "ENTER
"}{MERGEFIELD City}{SET Place {MERGEFIELD City}}ENTER
ENTER
"}{MERGEFIELD Employee}TAB{MERGEFIELD Sales}ENTER
"}ENTER

For the second example, the field code becomes:
{QUOTE{IF{MERGESEQ}= 1 {SET Place ""}}"{IF{MERGEFIELD City} {Place} "{IF{MERGESEQ}= 1 "" {QUOTE 12}}{MERGEFIELD City}{SET Place
{MERGEFIELD City}}ENTER
ENTER
"}{MERGEFIELD Employee}TAB{MERGEFIELD Sales}ENTER
"}ENTER
or
{QUOTE{IF{MERGESEQ}= 1 {SET Place ""}}"{IF{MERGEFIELD City} {Place} "{IF{MERGESEQ}= 1 "" "
----------------------------Page Break--------------------------------
"}{MERGEFIELD City}{SET Place {MERGEFIELD City}}ENTER
ENTER
"}{MERGEFIELD Employee}TAB{MERGEFIELD Sales}ENTER
"}ENTER

For the third example, the field code becomes:
{QUOTE{IF{MERGESEQ}= 1 {SET Place ""}}"{IF{MERGEFIELD City} {Place} "{IF{MERGESEQ}= 1 "" "ENTER
"}{MERGEFIELD City \* Upper}{SET Place {MERGEFIELD City}}ENTER
ENTER
"}{MERGEFIELD Employee}TAB{MERGEFIELD Sales}ENTER
"}ENTER

For the fourth example, the field code becomes:
{QUOTE{IF{MERGESEQ}= 1 {SET Place ""}}"{IF{MERGEFIELD City} {Place} "{IF{MERGESEQ}= 1 "" "ENTER
"}These are the records for {MERGEFIELD City \* Upper}{SET Place {MERGEFIELD City}}ENTER
ENTER
"}{MERGEFIELD Employee}TAB{MERGEFIELD Sales}ENTER
"}ENTER

--
Cheers
macropod
[MVP - Microsoft Word]


"vaitrafra" wrote in message news
Hi all,
I searched the web but it seems i can't find my answer.

I'm trying to populate a table via mail merge.

It's the common situation of a commercial quote where in the first MM record
you wnat to print the headline with addresses etc. and from the second record
to the end you have to print out a product table with descriptions and prices.
I cant find a way to tell to MM to populate the table consequentially,
without creating an entire new table for each record but advancing to a new
row at every one (like pressing tab in the last cell of the row).

Thanks.

P.S. I know that's the worst english ever, but i'm italian, cant help it.


  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
macropod[_2_] macropod[_2_] is offline
external usenet poster
 
Posts: 2,059
Default Word Mail Merge and Word Tables.

Hi vaitrafra,

You can't use a catalogue merge to add rows to a Word table. In the examples I just posted, the merged records are written out to
separate rows in the body of the document. You could format those rows with a table-like layout.

--
Cheers
macropod
[MVP - Microsoft Word]


"vaitrafra" wrote in message news
Hi all,
I searched the web but it seems i can't find my answer.

I'm trying to populate a table via mail merge.

It's the common situation of a commercial quote where in the first MM record
you wnat to print the headline with addresses etc. and from the second record
to the end you have to print out a product table with descriptions and prices.
I cant find a way to tell to MM to populate the table consequentially,
without creating an entire new table for each record but advancing to a new
row at every one (like pressing tab in the last cell of the row).

Thanks.

P.S. I know that's the worst english ever, but i'm italian, cant help it.


  #4   Report Post  
Posted to microsoft.public.word.mailmerge.fields
vaitrafra vaitrafra is offline
external usenet poster
 
Posts: 2
Default Word Mail Merge and Word Tables.

uhm.

I understand but i think it's a huge limitation.
I can't use tab separator becouse i have very long descriptions and there's
no chance to obtain a nice formatted document.

I wrote an VB6 Addin that creates the table and populates it with merge
fields, but the solution is neither elegant nor secure.
In fact, the data is obtained from MS Dynamics CRM via mail merge templates.
The Addin solution works with the web interface data source, (that is, a txt
file created by the mail merge macro from CRM) but can not work with outlook
client for CRM that works on a different implementation to obtain the MM
datasource.

I can read the Datasurce object programmatically, but it doesn't return the
rowcount property which i need to predict how many table lines will be
inserted in the document.

so, i will move the question to the CRM community.

Thanks so much for the replyies.

"macropod" wrote:

Hi vaitrafra,

You can't use a catalogue merge to add rows to a Word table. In the examples I just posted, the merged records are written out to
separate rows in the body of the document. You could format those rows with a table-like layout.

--
Cheers
macropod
[MVP - Microsoft Word]


"vaitrafra" wrote in message news
Hi all,
I searched the web but it seems i can't find my answer.

I'm trying to populate a table via mail merge.

It's the common situation of a commercial quote where in the first MM record
you wnat to print the headline with addresses etc. and from the second record
to the end you have to print out a product table with descriptions and prices.
I cant find a way to tell to MM to populate the table consequentially,
without creating an entire new table for each record but advancing to a new
row at every one (like pressing tab in the last cell of the row).

Thanks.

P.S. I know that's the worst english ever, but i'm italian, cant help it.



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
Word 2007: Tables and Mail-Merge Phillip Mailmerge 1 June 23rd 07 02:30 AM
Word 2000 Tables & Mail Merge BetsyC Tables 1 October 17th 06 11:52 AM
Word 2000 Tables & Mail Merge BetsyC Tables 0 October 11th 06 05:15 PM
Word mail merge won't show me my queries, only tables PNR Mailmerge 1 April 6th 06 09:26 AM
mail merge 2 access tables into word caret19 Mailmerge 1 June 9th 05 08:50 PM


All times are GMT +1. The time now is 12:48 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"