Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to edit Memo field
Message
De
23/07/2005 19:53:35
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
23/07/2005 18:40:17
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
01035419
Message ID:
01035429
Vues:
18
James showed how to replace one specific paper size.

To replace "any size" with 121, I think you will have to parse the text.

In VFP 6 and later, you can use alines() to convert the lines of the memo field (or any other text) to an array. Then you can manipulate each line. Specifically, if a line starts with PAPERSIZE, replace it with PAPERSIZE=121. Keep other elements as they are. Finally, write the array back to your memo field; REPLACE ... ADDITIVE can be useful for this.

>I got the new papersize number and want to change the Memo field of the table (actually report.frx) programmatically:
>
>the original content:
>
>DRIVER=winspool
>DEVICE=HP LaserJet 6MP
>OUTPUT=LPT1:
>ORIENTATION=0
>PAPERSIZE=1
>ASCII=1
>COPIES=1
>DEFAULTSOURCE=7
>PRINTQUALITY=600
>COLOR=2
>YRESOLUTION=600
>TTOPTION=2
>COLLATE=1
>
>change the PAPERSIZE=(any number) to PAPERSIZE=121
>and ASCII=(any number) to ASCII=121
>
>while I can't know for sure at what row it will be.
>
>is it possible to do it?
>
>please advise, thanks.
>
>regards,
>
>Jerry
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform