Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Strategy for Printing/Modifying RTF Files?
Message
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
00905425
Message ID:
00909037
Views:
17
Alex,

Thanks. I have studied the RTF files, so I does look like I could pretty easily manipulate them with the low level file i/o functions, or, I could read the text into a memo field, manipulate it with vfp functions like strtran(), and write it back out again.

I didn't find MS's documentation on the RTF standard to be very helpful. Do you know of any resource that provides a good capsule summary of the RTF standards and syntax and of the various tags.

As far as WSH goes, I recall working with that about 2 years ago, using one of the scripting host objects to find special folders, but, I'd have to refresh my memory, and I'd have to figure out exactly how WSH would let me do that. I am guessing that you are suggesting that I use WSH to open wordpad from within vfp and then print? Is it possible to instruct wordpad to open and then print a document automatically? Does wordpad have an automation object like word? Can I use wsh to send keystrokes to wordpad, or use some startup parameters? So far I haven't been able to find enough documentation on this to move forward.

Thanks again.

>Hi David,
>
>Word opens rtf documents natively, so you could continue using automation as you've had in the past.
>
>RTF's, as you probably know are just text files with special tags (very similar to html), so it really is trivial to do merges using vfp.
>
>If MS Word isn't available, you can still print the resulting rtf files using WordPad and a bit of WSH magic.
>
>Have fun!
>
>Alex
>
>
>>I am looking for some advice on the most straightforward way to implement modifying/mailmerging and printing RTF based legal documents (or other documents with variable data) through a VFP (or .net) application.
>>
>>Here are my requirements:
>>
>>1) For starters (phase I of the project) all I have to do is print an RTF document as is, without modifying it. Thats it - select the existing RTF file from a grid, open it and print it.
>>(The client has supplied me with existing RTF documents - in the places where variable data goes - they have the string "*.*". I am guessing that some other program they used filled these occurrences with the proper data based upon the position - e.g. first, 2nd or third occurrence of *.*)
>>For phase one we will just hand change the RTF files to have '______' where appropriate instead of *.*
>>
>>2) For phase 2 I need to take these existing RTFs and map each document to some sort of data entry form or wizard, and then have the application merge the data.
>>
>>3) Right now I don't have any requirement to 'build a word processor' inside my application, or do any fancy editing of the RTFs. I'd just like to be able to create/modify the RTF's myself using word.
>>
>>
>>Here are my questions:
>>
>>1) I have seen the advertisements for VisDocs 2.0 at www.codemine.com
>>Has anyone tried this/ had good results?
>>
>>2) The codemine authors recommend using their tool in conjunction with TX Control. Does anyone have any experience with this product.
>>
>>3)Are these tools overkill for my stated requirements? I know that Microsoft has a free ActiveX control for RTF. Is this control too limited to accomplish what I want or will it easily do the trick? I don't want to spend too much time investigating it if it won't easily give me what I need.
>>
>>4)I don't want to spend a lot of money on tools for this project if I don't have to, but will if necessary.
>>
>>5) In the past I did some word automation projects. I could convert these RTF's to word and use word automation instead - but then the client would need word installed on every machine that uses the application - and, I have heard that word automation is slower. Any other input as to the advantages and disadvantages of word automation vs RTF?
>>
>>TIA for any suggestions
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform