string variable that contains formatting

G

Guest

Using RTF as editor, can I assign the typed and formatted text of the body of
a message to a variable that remembers the formatting? I want to be able to
automatically truncate a signature and replace it with a different one - fine
with the usual string functions but all of them strip out any formatting the
user has included.
 
J

Jay Taplin

You should be able to assign the RTF property to a string variable, such as:

strRTF = RichTextBox1.RTF

To parse the text and replace the signature you'll need to understand the
RTF codes...

Jay Taplin MCP
 
J

Jay Taplin

Sorry, my other post was for .NET... I was thinking I was still in the .NET
group!

Use the .TextRTF property.

Jay Taplin MCP
 
G

Guest

That looks possible Eric - I've been looking at some of Sue Mosher's
published code and that may do the trick. Is there any way in VBA to switch
editors as I see the EditorType property is read-only? And I guess I could
have problems as my company has switched off the option to use Word as editor
(by way of a group policy).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top