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

Why not try first to set the SelText property, and only then set the font
attributes?

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

wrote in message
oups.com...
Let's say I have this code, which uses the Redemption SafeInspector
library:

Set sInspector = CreateObject("Redemption.SafeInspector")
sInspector.Item = Application.ActiveInspector
If sInspector.EditorType = olEditorRTF Or sInspector.EditorType =
olEditorWord Then
Set RTFEditor = sInspector.RTFEditor
RTFEditor.SelAttributes.Name = "Courier New"
RTFEditor.SelAttributes.Size = 8
' here's the question...
' RTFEditor.RTFSelText = ""
End If

...and then there are bunch of calls like

sInspector.SelText = "Some string"

Now, what I'm finding is that "Some string" prints out in whatever
font/size the Outlook email editor is already using. On the other
hand, if I uncomment that RTFEditor.RTFSelText="" line, then subsequent
calls to sInspector.SelText are in the chosen font/size.

Is there something I'm missing here (no surprise!) or is there a
different way of outputting "Some string" I should be using...? This
is Outlook 2003, if that matters.

Thanks!

-S.



Ads