Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Automating VFP from Word
Message
From
02/06/2008 13:15:31
 
 
To
02/06/2008 10:13:27
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
01320978
Message ID:
01321057
Views:
16
>I have seen quite a lot of samples of VFP controlling Word or Excel, but I would like to see something the other way round - a Word macro that does something - anything - with Visual FoxPro. Any sample, to help me get started, would do.
>

I worked on a project a long time ago where we built a small COM object in VFP and called it from Word (and Excel and PowerPoint). The COM object retrieved and updated certain information.

So, in the VBA code, I had something like (and this is off the top of my head, and thus probably buggy):
DIM oVFP as MyVFPComObject.Whatever

oVFP = CREATEOBJECT("MyVFPComObject.Whatever")
oVFP.MyMethod(<some data from the document>)

OVFP = Nothing
The app in question was doing CRM and the staff was required to create all documents through the VFP app, but might close the VFP app after spawning the document. We had some things we wanted to do with the VFP data (actually, it was SQL Server, but that isn't really relevant) based on what the user did with the document.


Tamar
Previous
Reply
Map
View

Click here to load this message in the networking platform