Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Passing parameters to a method in 'word.application'
Message
De
13/03/2002 19:33:29
 
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00632467
Message ID:
00632495
Vues:
21
All variables in VFP are of variant type. The type is defined when you assign a value to it.

All you should need to do is pass the empty values in place of the parameters that you do not wish to set.

So if you are calling a method which requires two optional parameters (the first being a default of character, the second numeric) and you want to specify the second parameter and not the first you would call it like this:
Object.Method("", 10)
>That won't do it, the parameter should be passed as a VARIANT type variable,
which I don't know how.
>
>Here is another example, note that the 1st paramenter is diferent in both syntaxis :
>
>Syntax 1
>expresión.Save(NoPrompt, OriginalFormat)
>
>Syntax 2
>expresión.Save(Comment)
>
>Syntax 1: Requerida. Expresión que devuelve un objeto Documents.
>Syntax 2: Requerida. Expresión que devuelve un objeto Versions.
>
>NoPrompt = Type Variant optional.
>OriginalFormat = Type Variant optional.
>Comment = Type Variant optional.
>
>Here is the VBasic example:
>
>Syntax 1:
>Documents.Save NoPrompt:=True, OriginalFormat:=1
>
>Syntax 2:
>Documents.Save Comment:="Minor changes to intro"
A fish this fine deserves to be a fish nugget styled chunklet.
- Fry
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform