HTML and Outlook 2007

  • Thread starter Thread starter DougKlippert
  • Start date Start date
D

DougKlippert

Has anyone found a way to edit HTML in 2007?
I'm looking to add signatures like we could in 2003, especially
Feedburner gifs

Doug
 
Diane said:
you can still add signatures... it's done the same way.
In the days of yore when constructing a signature, one went to
Tools>Options Mail Format and clicked on Signatures.
A signature could then be created or edited.
One of the options was Advanced Edit...
That opened FrontPage for HTML coding.
My test machine has Expression installed.

I don't see how to edit HTML in 2007.
Thanks,
Doug
 
Outlook now has a better editor built in - if you feel the need to edit the
source, find the signature HTML and edit it. Note that advanced HTML won't
work in Outlook because of security measures.
 
Edit Outlook email HTML

If you know how to run VBA macros, this may help, although it isn't as easy as using OE.

Public Sub EditEmailHTML()
' see: http://support.microsoft.com/kb/212730

'Takes an open email
'Reads the internal HTML
'Copies it to the clipboard
'Waits with a msgbox.
'You paste it into an editor (notepad)
'You edit the HTML
'You copy the modified HTML back into the clipboard (select all, copy)
'You click 'OK' on the msg box
'The clipboard's HTML replaces the email's HTML
'The email is refreshed

'To run this macro, open an email -> Developer tab -> Macros (then run this macro)
'Be sure to enable the Developer toolbar for emails
'tools -> options -> Mail Format -> Editor Options -> _
'Popular -> check Show Developer tab

'DanInSanJose tested this in Outlook 2007


' NEEDS reference (VB Tools->References) to MS Forms 2.0 Object Library. Search for fm20.dll

Dim strEmailHTML As String
Dim strClipboardText As String

On Error GoTo NotText 'in the odd case the user copied something other than plain editor text


'For MailItem Object Members: http://msdn.microsoft.com/en-us/library/bb176688.aspx
Set myEmailItem = Application.ActiveInspector.CurrentItem
'MsgBox (myEmailItem.HTMLBody) 'for debug

strEmailHTML = myEmailItem.HTMLBody


'This is how to get the text from a string variable into the clipboard:
' see: http://support.microsoft.com/kb/212730

Dim myData As DataObject
Set myData = New DataObject

myData.SetText strEmailHTML
myData.PutInClipboard

'Now it is in the clipboard, wait for the user to finish editing it.
rtn = MsgBox("Please paste the HTML into an editor." & vbCrLf & "Edit it." & vbCrLf & "Copy the modified text into the clipboard." & vbCrLf & "Click OK to put it into the email" & vbCrLf & vbCrLf & "or Cancel to make no changes to the email", vbOKCancel, "Edit Email Raw HTML")
If rtn = vbCancel Then End

'This is how to get the text on the clipboard into a string variable:
Set myData = New DataObject
myData.GetFromClipboard
strClipboardText = myData.GetText
'MsgBox (strClipboardText)

'Replace the email's HTML with the clipboard's text
myEmailItem.HTMLBody = strClipboardText
myEmailItem.Display 'refresh the email

NotText:
If Err <> 0 Then
msg = "Data on clipboard is not text?" & vbCrLf & vbCrLf
msg = msg & "Error # " & Str(Err.Number) & vbCrLf _
& " was generated by " & Err.Source & vbCrLf _
& Err.Description
MsgBox msg, , "Error - Clipboard Is Not Text?", Err.HelpFile, Err.HelpContext
End If


End Sub
 
Back
Top