I have been using Fox6 automation to create a mailmerge wizard using my fox database into Word 2000. All was going swimmingly until I tried it on Word 2002 - d'oh! The connection seems to be different, as Word is using ODC (office data connection, I think). I have tried all sorts of permutations of the connection values, but to no avail.
As this is going into my distributed software I am trying to avoid DSN connections, but any help would be greatly appreciated.
Currently my (successful) mailmerge code is
If anyone has done a successful Word 2002 merge using automation, can you shed any more light on what I would need to connect once more?
Thanks
Derren
[Mediocre talent - spread really thin]
As this is going into my distributed software I am trying to avoid DSN connections, but any help would be greatly appreciated.
Currently my (successful) mailmerge code is
Code:
* sqltext is the generated sql code
* sql2 is the other part of the sql if it is longer than 255 chars
* mergepath is the path to the folder containg the data
mtable = mergepath + "mailmerge.DBF"
msource = "DSN=FoxPro Files - Word;SourceDB=" + folder containing table + ";SourceType=DBF;"
odocument.mailmerge.OpenDataSource(mtable,0,.f.,.f.,.t.,.f.,"","",.f.,"","",msource,sqltext,sql2)
If anyone has done a successful Word 2002 merge using automation, can you shed any more light on what I would need to connect once more?
Thanks
Derren
[Mediocre talent - spread really thin]