Mailmerge in MS Word with FlexOLE/FlexCOMby Dan Walsh
How it works.
First of all, you must have FlexOLE and Microsoft Office 97 installed on your system. Copy the .Doc Word document files to the Order entry example folder vdf6\examples\order\Data .Copy the remaining files to the AppSrc directory. Start the IDE in the order entry workspace
Select 'Register external component' from the 'Components'-menu and select the custmm1.vw file to register. Repeat this for the custmm2.vw file. Include the Word8 and FlexOLE packages in your main program. Object ProgramWorkspace is a Workspace Set WorkspaceName to CURRENT$WORKSPACE Set ModuleName to 'Order' Set HelpName to 'OrdEntry.hlp' End_Object Use Help_Ids.inc // Developer should provide this file of help context links. Use Std_Help.pkg // In VDF6, you should include: //Use FlexOLE.pkg // In VDF7 or higher, this is changed to: Use FlexCOM.pkg Use Word8.pkg Add the new views to your program
Compile the Order Entry sample application. Below is an example of how-to include those packages into VDF8 Object oApplication is a cApplication Set psCompany to "Data Access Worldwide" Set psProduct to "Visual DataFlex 8 Examples" Set psVersion to "8.0" Set psProgram to "Order" Set psHelpFile To "OrdEntry.hlp" Procedure OnCreate Send DoOpenWorkspace CURRENT$WORKSPACE End_Procedure End_Object // oApplication Use Help_Ids.inc // Developer should provide this file of help context links. Use Std_Help.pkg Use FlexCOM.pkg Use Word8.pkg Mailmerge example 1
Dan Walsh Mailmerge example 2My heartfelt thanks to Dan Walsh, who pioneered the creating of this prototype late in 1998 when most of us had'nt even thought about it ! Dan's "Custmm1.vw" code has been enhanced so that: .
Thanks to Dave Robinson for pointing me in the right direction on this one.
My thanks also to those others who contributed assistance when I needed it most - much appreciated.
The VDF-GUIdance philosophy certainly makes life MUCH easier and more enjoyable Peter Tawse Microbase Software MELBOURNE, AUSTRALIA email: ptawse@tbsa.com.au Notes Be sure that you use the supplied version of the Word8.pkg file as this contains some fixes to known problems. The changed list of methods is:
DownloadsMs Word Mailmerge example VDF6 version ![]() Ms Word Mailmerge example VDF7/VDF8 version ![]() LinksOrder Expanded Example DataPower from Torben Lund go to the download page (not available anymore) Mailmerge code by Focus |
|||||||||||
Copyright © 1999 - 2025 VDF-GUIdance on all material published, for details see our Disclaimer. |