Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP equivalent to VB :=
Message
De
31/01/2001 00:00:42
 
 
À
30/01/2001 23:24:53
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00470447
Message ID:
00470522
Vues:
40
>>>My question involves the bolded line for TypeText. I've probably got this wrong, but reading the VB help I got the impression that := was used to pass a parameter to a function by name rather than by positon. The same code in VFP generated a syntax error.
>>>
>>>I couldn't find an equivalent in the VFP 6.0 help. I'm hoping someone here can enlighten me as to what this is and what a VFP equivalent code would be.
>>
>>VFP doesn't support named parameters. You have to find what order the parameterlist takes, and pass the parameters in order. Fortunately the TypeText function takes only a single parameter, the Text to output.
>
>Thanks for the quick response. So my code should be:
>
>    WITH toWord.Selection
>        IF tcSection <> ""
>            .ParagraphFormat.Alignment = wdAlignParagraphCenter
>            .Font.Bold = wdToggle
>            .Font.Size = 18
>            .TypeText(ConvertSepType(tcSection))
>            .TypeParagraph
>        ENDIF
>     ENDWITH
>
>
>Can I impose on you to point me to where I could find documentation on the parameters the various functions need? There are other pieces of the program which use the same syntax (the InsertBreak in my original sample snippet, for example).
>
>Once again...Thanks a bunch............Rich

If you installed VBA help when you installed Office, you already have the help file. In Word hit Alt-F11 to get the VBA editor. In the editor, hit F2 to get the VBA object browser. From there you can search to find the method or object in question, right click on the item in the search results, and select Help to get the syntax for using the object and command.
Erik Moore
Clientelligence
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform