What i would like to do is progrmmically open Word, programmically place some data from the database in the doc and then let the user print or save or close it. I am running v 91D and will be on Win2003 server.
First of all, you must create word template.
Choose Insert, Field, MailMerge, MergeField. Then enter the name of the field and click ok. Field will appear in document somehow like this: «FIELDNAME».
Do this for every field you want to have in Word doc, and format the document as you like.
When the main document is merged with the selected data source, information from the specified data field is inserted in place of the merge field.
DEFINE VARIABLE hWord AS COM-HANDLE NO-UNDO.
DEFINE VARIABLE hDocument AS COM-HANDLE NO-UNDO.
Is this a compile or a runtime error? What's the error message number? I've just tried it here and it works fine. That's with 9.1D08, WinXP and MS-Word 2002 SP2.
There is no variable cSearch in spell.p. However, cSearch is mentioned but not defined in the sample coded that tvrtko posted earlier. Why not just simply define it ?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.