Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Automating VFP from Word
Message
De
02/06/2008 13:15:31
 
 
À
02/06/2008 10:13:27
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
01320978
Message ID:
01321057
Vues:
17
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform