RE: HTMLEditor pasting loses <BR> tags
- From: BertrandG <BertrandG@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 9 Oct 2008 04:38:00 -0700
Hi,
OK ! I feel a bit lost. I work in a support organization, and very often I
have to change only a part of the text in the email body. The mails (html,
RTF,...) are coming from the customers we are supporting.
I tried to find a solution with the clipboard the selection ... but never
sorted it out ...
Have a nice day.
WBR /bertrand
"DaveS" wrote:
Hi Bettrand,.
No i have not been able to solve this yet. I'm guessing I need to somehow
select the range differently, as when I debug the macro the <BR> tags never
make it into my variable.
Luckily I rarily use HTML emails...
Dave
"BertrandG" wrote:
Hello Dave,
I am Bertrand a lost French in the far notrh of Sweden ;o).
I am facing the same problem as you but I secretly hope that you solved it
could help me ...
I am quiet a new beginner in this kind of macro, so in advance I would like
you to be kind with me.
I am using Outlook2003. Did you resolve your macro and is it working with
HTML and RTF editors ?
in advance thank you for your help.
WBR / bertrand
"DaveS" wrote:
I'm trying to create a macro that can change the selected text into a
particular font and colour for RTF or HTML emails
The code below works for RTF, but for HTML the selected text loses all the
<BR> and   tags, so a highlighted list becomes one line after running the
macro.
Any ideas ?
Sub Green()
Set sInspector = CreateObject("Redemption.SafeInspector")
sInspector.Item = Application.ActiveInspector
Set RTFEditor = sInspector.RTFEditor
Set HTMLEditor = sInspector.HTMLEditor
SelText = sInspector.SelText
If (sInspector.EditorType = olEditorRTF) Then
Set textAttr = RTFEditor.SelAttributes
textAttr.Color = &H8000&
textAttr.Name = "Courier New"
ElseIf (sInspector.EditorType = olEditorHTML) Then
Set r = sInspector.HTMLEditor.Selection.createRange()
newHTML = "<font face='Courier New' color=#008000>" & _
r.Text & "</font>"
r.pasteHTML newHTML
ElseIf (sInspector.EditorType = olEditorWord) Then
Set doc = sInspector.WordEditor
Set sel = doc.Parent.Selection
With sel.Font
.Name = "Courier New"
.Color = &H8000&
End With
End If
End Sub
- References:
- HTMLEditor pasting loses <BR> tags
- From: DaveS
- RE: HTMLEditor pasting loses <BR> tags
- From: BertrandG
- RE: HTMLEditor pasting loses <BR> tags
- From: DaveS
- HTMLEditor pasting loses <BR> tags
- Prev by Date: RE: HTMLEditor pasting loses <BR> tags
- Next by Date: Re: Outlook crashes when using PasteFace() method.
- Previous by thread: RE: HTMLEditor pasting loses <BR> tags
- Next by thread: Outlook crashes when using PasteFace() method.
- Index(es):
Relevant Pages
|