Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Mailmerge with Word 2007
Message
 
 
To
12/07/2011 20:14:35
Hong Yew
People Quest
Malaysia
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Desktop
Miscellaneous
Thread ID:
01518026
Message ID:
01518310
Views:
50
You have to specify full file names including path
>
>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)
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform