View Single Post
  #6  
Old July 26th 06, 09:46 PM posted to microsoft.public.outlook.program_vba
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default Simple Question on SafeInspector's RTEEditor

I am not sure I understand: the last change wins, i.e. you are supposed to
get "Here is my SelText", *not* "Here is my RTF Text".
Did you expect anything else? Why do you set the sInspector.SelText property
after you set RTFEditor.RTFSelText?

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

wrote in message
ups.com...
Dmitry Streblechenko wrote:
Sorry, I meant RTFSelText:

Set RTFEditor = sInspector.RTFEditor
RTFEditor.RTFSelText = "your RTF formatted text here"
RTFEditor.SelAttributes.Name = "Courier New"
RTFEditor.SelAttributes.Size = 8


This code::

Set sInspector = CreateObject("Redemption.SafeInspector")
sInspector.Item = Application.ActiveInspector
If sInspector.EditorType = olEditorRTF Then
MsgBox ("Sorry, you're not in RTF")
Exit Sub
end if
Set RTFEditor = sInspector.RTFEditor
RTFEditor.RTFSelText = "Here is my RTF Text"
RTFEditor.SelAttributes.Name = "Courier New"
RTFEditor.SelAttributes.Size = 8
sInspector.SelText = "Here is my SelText"

prints

Here is my SelText

in the correct formatting...but it doesn't print "Here is my RTF Text".
It also works ("Here is my SelText" is printed in the correct
formatting) if the the RTFEditor.RTFSelText is set to ""

I'm just not sure it's supposed to be that way

-S.



Ads