Hi all,
I have VFP Application to launch Word mailmerge window, and I used mailmrge.vcx class
the code is below
When the application run on computer with Office 2021 installed, causing error: "Unable to open datasource". I have installed VFP OLE DB driver.
I think maybe the vcx is not compatible with office 2021, because the application is running well with Office 2019 or below.
Is the anyway I could fix this?
and also, with the code above, the datasource is an alias (opened table). How could I modify the code if I want the free table (dbf file) to be the datasource?
Many thanks
I have VFP Application to launch Word mailmerge window, and I used mailmrge.vcx class
the code is below
Code:
WITH THISFORM._mailmerge
.cAppTitle = "Kontrak Sewa" && application name, used in Alerts
.nWordProc = 1 && word processor (1 = Word 6+; 2 = CommaDelim; or user-defined (see below); default = 1)
.nNewDoc = 2 && is it a new doc (1 = new, 2 = existing; default = 1)
.cdocname=mdrive+mfile
.nTemplate = 1 && type of main document (Word only, 1 = form letter; 2 = label; 3 = envelope; 4 = catalog; default = 1)
.cAlias = ALIAS() && alias of source table or view
ACOPY(aflds, .aAutoFields) && fill in array of field names to be used
.MakeOutput() && do the merge
ENDWITH
When the application run on computer with Office 2021 installed, causing error: "Unable to open datasource". I have installed VFP OLE DB driver.
I think maybe the vcx is not compatible with office 2021, because the application is running well with Office 2019 or below.
Is the anyway I could fix this?
and also, with the code above, the datasource is an alias (opened table). How could I modify the code if I want the free table (dbf file) to be the datasource?
Many thanks