Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
Word
application.errors
conversions
docmanagement
drawing.graphics
formatting.longdocs
international
internet.assistant
mail
mailmerge.fields
menustoolbars
newusers
numbering
oleinterop
pagelayout
printingfonts
setup.networking
spelling.grammar
tables
vba.addins
vba.beginners
vba.customization
vba.general
vba.userforms
web.authoring
word6-7macros
word97vba
  
 
date: Mon, 28 Jul 2008 00:24:00 -0700,    group: microsoft.public.word.mailmerge.fields        back       


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.
date: Mon, 28 Jul 2008 00:24:00 -0700   author:   vaitrafra

Re: 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:D3B55BD5-E523-4EFB-A28E-70309C1BF4CF@microsoft.com...
> 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.
>
date: Mon, 28 Jul 2008 17:51:20 +1000   author:   macropod lid

Re: 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:D3B55BD5-E523-4EFB-A28E-70309C1BF4CF@microsoft.com...
> 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.
>
date: Mon, 28 Jul 2008 17:53:41 +1000   author:   macropod lid

Re: 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:D3B55BD5-E523-4EFB-A28E-70309C1BF4CF@microsoft.com...
> > 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.
> > 
> 
>
date: Mon, 28 Jul 2008 03:18:03 -0700   author:   vaitrafra

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us