Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Copying rich text from a Word file
Message
From
18/08/2000 17:32:07
 
 
To
18/08/2000 04:34:02
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
00406482
Message ID:
00406913
Views:
18

>You can use: APPEND MEMO memofield FROM wordfile.rtf
>
>Them make the RichText control work on the memofield.


This works fine...to copy a whole file. But I want to copy selected text from a file (not the whole file). For example, suppose I have an object reference, odoc, to the word.document I'm interested in, and there is a table containing a cell that has text in mixed format. The only way I've been able to reference the text (with formatting) is with the following.
ocopytext = odoc.tables(1).cell(1,1).range.formattedtext
this results in a range object ocopytext.

I'm not sure how to get the text out of ocopytext into the rtf control. The following does not work.
omyrtfcontrol.textrtf = ocopytext.formattedtext
Also. Although your suggestion copies whole files, the act of transferring the memo field to the rtf control causes some of the rtf formatting to be lost. Specifically, table formatting (which the rtfcontrol help claims to support) is removed. But this is just a side note. My main objective is to copy rtf strings (containing mixed format) between VFP and Word (in either direction) and preserve the formatting.
"The Iron Fish: The water is cold...but the fish don't mind"
...Jay Jenks, boyhood chum
Previous
Reply
Map
View

Click here to load this message in the networking platform