In our app there is a section where users can define there own "templates" for emails that are sent throughout the system. Users can add predefined tags to the document, and then the RVF is saved to a stream which is stored in a blob in the db.
eg
//
This is a template and <% THIS.IS.A.TAG %> to be replaced with other data.
//
Basically what I want to be able to do, is on our appserver, possibly in a separate thread, it to load the blob to stream, and then call the TRichView.LoadRVFFromStream, call TRichView.SelectAll, and then TRichView.GetSelText and then parse that text with regular expressions, so I can get the exact tags out, get the data for those tags, and then do a find replace in TRichView and replace the tags with the correct data, and then possibly export to html.
However, if I call TRichView.SelectAll without calling TRichView.Format, I get an index out of bounds error, and if I call TRichView.Format, I get the no parent window error.
How do I go about getting the text when the Trichview is not on a form?
Also, when will the find functionality support RegEx?
Thanks in advance
Shaine
Getting Text from RVF loaded non-visually
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Formatting is the slowest operation. If you do not need to display document, try avoiding it. Yes, working with selection requires formatted document. But is selection really needed for this task?
You can analyze document item by item and replace fields.
See here for demos: http://www.trichview.com/forums/viewtopic.php?t=8
You can analyze document item by item and replace fields.
See here for demos: http://www.trichview.com/forums/viewtopic.php?t=8