Compartir a través de


Automate a Microsoft Word Document in a Form Sample

File: ...\Samples\Solution\OLE\Oleword.scx

This sample shows how you can automate an embedded Word object on a form, insert some rich text, and then format the text. Typical automation with Word is usually done using the "Word.Basic" object used interactively with a CREATEOBJECT( ) function.

oForm = THISFORM
oForm.AddObject('oWordDoc','OleControl','WordDocument')
oForm.oWordDoc.Visible =  .t.
oForm.oWordDoc.DoVerb(0)

See Also

Tasks

Automate a Microsoft Excel Spreadsheet Sample

Automate Microsoft Word and Excel Sample

Other Resources

Automation Solution Samples