O
Omatase
I have an application I'm writing that needs to move text from one
place in a word doc to another. A simple enough process but it's
proving to be difficult to get just right. Right now I have it
*working* using cut and paste. The only problem with this is that, as
their names imply, these methods actually use the Windows clipboard.
This won't work for me as I don't want people to have to be aware of
the fact that while this utility is running they cannot use the
clipboard for anything or the application will mess up their
documents.
In my application I find and select a range of text. Then on the range
I say Cut(). I know that on the same range object I have a property
named "Text". The problem I have with using this is that the specific
text I am moving has merge fields in it. They look something like this
"{merge field}". When I try to read the text property of a range that
has a merge field in it, instead of getting the above text, I get
boxes where the "{" and "}" characters are. So, using the Text
property to move the text around actually changes the text to
something unusable. Does anyone know a fix for this?
Thanks much
place in a word doc to another. A simple enough process but it's
proving to be difficult to get just right. Right now I have it
*working* using cut and paste. The only problem with this is that, as
their names imply, these methods actually use the Windows clipboard.
This won't work for me as I don't want people to have to be aware of
the fact that while this utility is running they cannot use the
clipboard for anything or the application will mess up their
documents.
In my application I find and select a range of text. Then on the range
I say Cut(). I know that on the same range object I have a property
named "Text". The problem I have with using this is that the specific
text I am moving has merge fields in it. They look something like this
"{merge field}". When I try to read the text property of a range that
has a merge field in it, instead of getting the above text, I get
boxes where the "{" and "}" characters are. So, using the Text
property to move the text around actually changes the text to
something unusable. Does anyone know a fix for this?
Thanks much