Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
List of Microsoft Word ActiveX Controls
Message
From
05/11/2002 20:06:20
 
 
To
05/11/2002 19:41:29
Brian Leidel
Myers & Stauffer CPA's
Denver, Colorado, United States
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00719121
Message ID:
00719126
Views:
14
>Novice question here, but I'm just looking for documentation for VFP's ActiveX controls in Microsoft Word 2000. Right now I'm just fumbling around with trial and error. I want to know what all of the properties and methods are for Content, ActiveDocument, Documents, etc. and how to use them.
>

The thing that you need is the COM Object presented by MS-Word. It's not an ActiveX control, but an actual, running instance of Word that exposes an interface to other programs rather than a control per se. ActiveX controls are a special case of the generic COM component that can interact directly with the Event loop of another host application and can be contained within the host application's process.

What you need is the Automation Model for the version of MS Word you're working with; for example, if you work with Word 2000, the object model is described in VBAWRD9.CHM (it describes things in terms of Visual Basic for Applications, but the syntax is very close to VFP's, and you can see what the events, methods, subobjects, collections and properties are.)

Tamar Granor and Della Martin wrote a book on using Office Automation (including Word) from VFP; it's published by Hentzenwerke ( www.hentzenwerke.com ) and can be ordered from their web site, both in printed book format and as an e-book for a bit less money - and the e-book and sample code can be downloaded immediately on purchase from their site. It includes an overview of what each Office app exposes for an interface and how to use some of the interfaces from within VFP, using VFP code.

>I'm using the FRX2Word tool to create .DOC files in Word from VFP reports, and I want to be able to merge several reports together to create one long Word document. My users don't like VFP's built in report preview, because they want to be able to view and search several reports together without closing or hitting buttons to go back and forth.
>
>The InsertFile method does not work on this, by the way, because of the weird formatting the FRX2Word tool does.
>
>My little program is looking like this right now. I need access to ActiveX controls documentation to do more:
>
>PARAMETERS ReportName
>
>m.ReportToWord=NEWOBJECT("frx2word","msoexp")
>ReportToWord.SaveFolder="C:\Temp\"
>ReportToWord.DOC_FileName=m.ReportName+".DOC"
>ReportToWord.ReportHome="M:\VLTC\Reports\"
>m.Successful=ReportToWord.ReportForm(m.ReportName)
>
>m.OpenWord=CREATEOBJECT("Word.Application")
>OpenWord.Documents.Open(ReportToWord.SaveFolder+ReportToWord.DOC_FileName)
>OpenWord.Visible=.T.
>
>Thanks!
>Brian
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Reply
Map
View

Click here to load this message in the networking platform