Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Page break problem in controlling Word from VFP
Message
De
28/06/2003 17:17:48
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00804882
Message ID:
00805049
Vues:
32
>Thank you for your help. But I can't seem to get
>that code past the FoxPro compile step; it flags the line ---
>Selection.InsertBreak Type:=wdPageBreak as a syntax error.

That is the VBA syntax, which VFP doesn't accept this way (basically, VFP doesn't understand named parameters).

If you save the macro in Word, you get exactly this command. Now, if you click on the "InsertBreak" command and press F1, you get the alternative syntax:
expression.InsertBreak(Type)
with the type within parentheses.

Word won't understand the constant wdPageBreak, either, until you get its numerical equivalent and define it as a constant. This can be done easiest with one of the downloads from the UT - search for "download"; there are several versions (for instance, download #9409).

The "expression" part, on the left, must be replaced with a range or selection object.

HTH,

Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform