Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Mailmerge and Fax / July 2008

Tip: Looking for answers? Try searching our database.

Word Mail Merge and Word Tables.

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
vaitrafra - 28 Jul 2008 08:24 GMT
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.
macropod - 28 Jul 2008 08:51 GMT
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>

Signature

Cheers
macropod
[MVP - Microsoft Word]

> Hi all,
> I searched the web but it seems i can't find my answer.
[quoted text clipped - 11 lines]
>
> P.S. I know that's the worst english ever, but i'm italian, cant help it.
macropod - 28 Jul 2008 08:53 GMT
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.

Signature

Cheers
macropod
[MVP - Microsoft Word]

> Hi all,
> I searched the web but it seems i can't find my answer.
[quoted text clipped - 11 lines]
>
> P.S. I know that's the worst english ever, but i'm italian, cant help it.
vaitrafra - 28 Jul 2008 11:18 GMT
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.

> Hi vaitrafra,
>
[quoted text clipped - 16 lines]
> >
> > P.S. I know that's the worst english ever, but i'm italian, cant help it.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.