Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Mailmerge
Message
From
27/10/2011 07:41:30
 
 
To
27/10/2011 05:11:39
Hong Yew
People Quest
Malaysia
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Title:
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2008
Network:
Windows 2008 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01527451
Message ID:
01527457
Views:
72
>Hi all
>
>MSWord mailmerge generates a letter per record. I need to generate letters with One to Many data from 2 tables.
>I am looking at possibility of doing mailmerge without using MS Word.
>
>Is this possible or is there a better alternative
>
>Your advice is much appreciated
>
>Thanks & Best Regards


I did this once

You need to add a field that indicates when the detail ends

You can control whether to advance a record with the NextIf in the mergefield code

http://office.microsoft.com/en-us/word-help/field-codes-nextif-field-HP005186175.aspx

It was a mailmerge to customers with open invoices

I had a code A for the header, D for detail, and T for Total


The last mergefield of the header (cust name, address, et) had
 {NEXTIF {MERGEFIELD type } = "A"}
The body - listing the open invoices
{  if { mergefield type} = "D" { mergefield invoiceamount} }
The field most to the right of the body
{  if { mergefield type} = "D" { mergefield daysopen} }  {NEXTIF {MERGEFIELD type } = "D"}
At the end of the page to print the total
{  if { mergefield type} = "T" { mergefield totalamountopen} }
Gregory
Previous
Reply
Map
View

Click here to load this message in the networking platform