Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Quick Transfer of Losts of VFP Data to Word Table?
Message
From
12/10/2001 21:26:06
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
12/10/2001 17:45:04
Isabel Cabanne
Hubbard Woods Software, Inc.
Winnetka, Illinois, United States
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00567281
Message ID:
00568076
Views:
22
>I started working with COPY TO, and the issue of getting data in with no character field delimiters (even spaces won't work for me), but soon realized I have a bigger issue. In many reports, I embed returns in the strings to format the data within an individual cell. For example: a formatted address designed for use in a mail merge. You can imaging the havoc that Word's Text to Table conversion works on that data.

You can convert CRs into "^R" or whatever is word's internal denoting a CR, using StrTran(), before copying out.

>I am going to try passing the data through HTML. I wonder, however: can I push a table onto the clipboard and paste it in somehow? Or, perhaps there's a row by row approach that's faster than a cell by cell population of the table.
>
>In any event, I need a VFP 6 resolution for the time being.

Another approach: select the data you need into a cursor. Then get all of it onto the clipboard:
_vfp.datatoclip(,,3)
Then paste it in Word. This gives you a tab-delimited set of values, with cr/lf between records, which Word can automatically convert into a table. As far as conversion of CRs goes, I figure ^R would confuse Word, but it can be manipulated once you have a table - a search/replace within Word can do that. Just use something like "%%" instead.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform