Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
RTF to HTML Data Conversion
Message
From
07/04/2000 00:15:23
 
 
To
06/04/2000 23:55:35
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
00356205
Message ID:
00356660
Views:
21
Munish,

>1. Create a new txt file
>2. Copy the rtf data to it.
>3. Rename txt file to rtf
>4. Open RTF file and the Word will convert it for you in RTF format.
>
>My problem is that I have this data in a DBF table and I want to convert it to HTML format progammatically. I used VFP commands like Copy Memo to copy data to txt file, renamed that file to RTF, copied back the data using Append Memo command but the word does not convert data unless you open that RTF file in it.

Just use COM automation in VFP to CREATEOBJECT an instance of Word, then control Word programmatically using its object model to make it read in the .RTF file and save it to an HTML file, then get that file back into a memo field if you want. Like I said, I don't know the the formatting will be what you want, but you can test that manually in Word before coding it.

Generally, if you can do it manually when you are running Word, you can do it with COM automation from VFP. Read the sections of the VFP Programmer's Guide related to COM automation. You should find a sample or two on controlling Word. The Word object model is in the MSDN library.
David Stevenson, MCSD, 2-time VFP MVP / St. Petersburg, FL USA / david@topstrategies.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform