Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Mail merging problems
Message
From
18/06/2004 06:34:37
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Title:
Mail merging problems
Miscellaneous
Thread ID:
00914952
Message ID:
00914952
Views:
37
Hello,

I'm trying to merge an existing database with an empty Word-document. The MailMerge-foundation class is teh perfect tool to do so but I'm not using a database-container but only a database. What settings
do I have to set to achieve this ?

LOCAL aFlds
DIMENSION aflds[4,1]
aflds[1,1] = "Name"
aflds[2,1] = "Address"
aflds[3,1] = "Place"
aflds[4,1] = "Country"

CREATE CURSOR Customers (Name c(40), Address c(80), Place c(40), Country c(30))
INSERT INTO Customers VALUES ("Cust1","Address 1","Somewhere","Belgium")
INSERT INTO Customers VALUES ("Cust2","Address 2","Somewhere","Belgium")
INSERT INTO Customers VALUES ("Cust3","Address 3","Somewhere","Belgium")

SELECT 'Customers'
COPY all to "c:\" + "customers" type fox2x as 1252

WITH THISFORM._mailmerge
.cAppTitle = "Customer merging"
.nWordProc = 1
.nNewDoc = 1
.nTemplate = 1
.cAlias = "Customers"
.cDBCTable = ""
.cDBCName = ""
ACOPY(aflds, .aAutoFields)
.MakeOutput()
ENDWITH
Next
Reply
Map
View

Click here to load this message in the networking platform