• Subject: Re: Outlook macro - new email - how to set font
  • Author: Ken Slovak
  • Date: 17 Jun 2010
  • References: 1 2 3
The best way to see what to do is to view the existing HTMLBody property in
an email formatted the way you want. Select an email like that in the folder
view and then open the Outlook VBA project (Alt+F11). Show the Immediate
window if it's not open and enter the following there:

? Application.ActiveExplorer.Selection(1).HTMLBody

Place your cursor in that line and press Enter to execute that line of code.
The actual raw HTML will be output to the Immediate window. You can then use
copy and paste to copy that to Notepad to view.

That's about the best way I've found to see what's going on and what needs
to be done to format things.

Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm

"Mark" <mark.ok7@gmail.com> wrote in message
news:12d0bdce-d15d-440a-9a12-678d7b378724@s4g2000prh.googlegroups.com...
On Jun 16, 11:05 pm, "Ken Slovak" <kenslo...@mvps.org> wrote:
> If the format of the email is HTML you will need to use HTML coding and
> tags
> for the font settings, using HTMLBody and not Body.

Many thanks Ken

New territory for me.
I tried this, but it did not work, it gives an error on the
first"<":
NewMsg.HTMLBody = <font face="Arial"> "Dear " & Left$
(myItem.SenderName, InStr(1, myItem.SenderName, " ") - 1) _
& "," & vbCr & vbCr & "Regards, Martin" </font>

Any help would be appreciated

Mark
15 Jun 2010Outlook macro - new email - how to set font.Mark
16 Jun 2010\ Re: Outlook macro - new email - how to set font.Ken Slovak
16 Jun 2010   \ Re: Outlook macro - new email - how to set font.Mark
17 Jun 2010      \ Re: Outlook macro - new email - how to set font.Ken Slovak
Contact Us
All times are in (US) Eastern Daylight Time (GMT -4:00)