General information
Category:
COM/DCOM and OLE Automation
Title:
Mailmerge with Word 2007
Environment versions
Network:
Windows 2008 Server
Hi
I am using Word 2007 and Excel 2007
My VFP 9 program attempts to call Word to perform mailmerge with following lines of code but encounter message that it cannot locate the XLS file.
Is there anyway to setup Word 2007 so that it will look for XLSX file or CSV file instead of XLS file
Would really appreciate if you could share your expertise.
Thanks & Best Regards
DECLARE INTEGER ShellExecute IN Shell32.DLL INTEGER hwnd, ;
STRING @lpOperation, STRING @lpFile, STRING @lpParameters, ;
STRING @lpDirectory, INTEGER nShowCmd
lcParms = ""
lcDir = addbs(toApplication.ProjectDirectory)+'DOCS'
lcFile = alltrim(juststem(lcOutputFileName))+'.DOC'
lcOp = 'open'
lnshow = 3
lnError = ShellExecute(0, @lcop, @lcfile, @lcparms, @lcdir, lnshow)
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only