Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP & Word Automation Commands
Message
De
25/02/2003 07:06:15
 
 
À
24/02/2003 22:30:28
Dick Day
Madison County, Nebraska
Nebraska, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00757384
Message ID:
00757468
Vues:
34
Hi Dick.

Can anyone tell me where to find the Word automation commands that can be used when creating an OLE control object in VFP? The MSN Office 2000 download document has great examples for VB but nothing for VFP. I don't know enough about OLE or VB to know how to translate the examples into usable VFP code.

In addition to what the others have told you, you can always use Word to record a macro and later edit it and translate the VBA code in the macro to VFP code by following these steps:

Suppose you have a line of VBA code that looks like this:

Selection.TypeText Text:= "yada yada yada"

1. Fully qualify the object. VBA assumes the application, but you have to add this for VFP so this becomes:

oWord.Selection.TypeText Text:= "yada yada yada"

2. Add parentheses:

oWord.Selection.TypeText( Text:=“yada yada yada” )

3. Remove named parameters:

oWord.Selection.TypeText( “yada yada yada” )

HTH
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform