Replacing all 'simiar' text occurrencies in richviewedit
Posted: Fri Aug 08, 2008 7:27 am
Hi
I want to do this:
given a text file of this format:
aaaaaaaa
{bmc xyz.gif)
bbbbbbbbb
{bmc xyz123.gif}
etc
I want to replace all the "{bmc " occurrencies with the gif they refer to.
So I can use rve.SearchText('{bmc ',GetRVESearchOptions(frOptions)).
But then? it will select "{bmc ", but how do I get the other variable length part (e.g. "xyz.jpg}" or "xyz123.jp}" that follows it?
Also, once I have determined the whole text (e.g. "{bmc xyz.jpg}"
can I use:
do while rve.SearchText('{bmc ',GetRVESearchOptions(frOptions)).
// get filename here
jp.LoadFromFile(filename);
rve.insertPicture('',jp, rvvaBaseline);
end;
rve.Format;
so that "{bmc xyz.gif}" disappears and the pic is shown in its place?
In order to SAVE the incorporated picture, do I need to set anything, before I save the document?
Thanksa lot.
I want to do this:
given a text file of this format:
aaaaaaaa
{bmc xyz.gif)
bbbbbbbbb
{bmc xyz123.gif}
etc
I want to replace all the "{bmc " occurrencies with the gif they refer to.
So I can use rve.SearchText('{bmc ',GetRVESearchOptions(frOptions)).
But then? it will select "{bmc ", but how do I get the other variable length part (e.g. "xyz.jpg}" or "xyz123.jp}" that follows it?
Also, once I have determined the whole text (e.g. "{bmc xyz.jpg}"
can I use:
do while rve.SearchText('{bmc ',GetRVESearchOptions(frOptions)).
// get filename here
jp.LoadFromFile(filename);
rve.insertPicture('',jp, rvvaBaseline);
end;
rve.Format;
so that "{bmc xyz.gif}" disappears and the pic is shown in its place?
In order to SAVE the incorporated picture, do I need to set anything, before I save the document?
Thanksa lot.