Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to edit Memo field
Message
From
23/07/2005 19:53:35
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
23/07/2005 18:40:17
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
01035419
Message ID:
01035429
Views:
16
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)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform