HOWTO: How To Cut/Paste from General Field into a Word DocumentLast reviewed: August 19, 1997Article ID: Q172847 |
The information in this article applies to:
SUMMARYThis article illustrates how to "Select All" and "Cut and Paste" an embedded Word Document from a general field into another Word document using code and OLE automation.
MORE INFORMATIONThe following example consists of two sections. The first section is to create a mail merge Word document with bookmarks. NOTE: This example only works in Microsoft Word 97.
Create a Word 97 merge document
Visual FoxPro-Specific Items
desired name. If you want to refer to an already launched instance containing your word document, you should leave the first parameter empty instead of using an empty string, otherwise you can launch a new (invisible) instance of Word containing a NEW document.NOTE: On random occasions this solution can cause an unexplained OLE error at the following line of code: WITH oWordObj.ActiveDocument.Bookmarks(pcMarkName).RangeThe error message follows:
OLE IDispatch exception Code 0 from Microsoft Word. The requested member of the collection does not exist.Microsoft is researching this behavior and will post new information here in the Microsoft Knowledge Base as it becomes available.
|
Additional query words: vfoxwin
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |