Script to change the Format to HTML when replying/forwarding mails

V

Vampire

Hi All,

I am trying to automate my manual task of changing to mail format to HTML
when replying/forwarding a Text/RichText Mail item. I am using Outlook 2007.
Can someone please post such script that could do this task.

Thanks in advance!!
 
V

Vince Averello

Apologies for not actually answering your question but...

If someone is sending you mail in Plain Text format, that might indicate
that they either prefer it that way or can't read HTML mail. Maybe you
shouldn't change the format to HTML on those...
 
V

Vampire

Thanks for your reply Vince..

I am new to Outlook Programming and exploring things.. Please help me with
a Script if you can..
 
A

Alan Moseley

This text has no error checking in it, but if you run this when you have an
email open, it should create a reply and change the format to HTML:-

Public Sub MyReply
Dim msg As MailItem
Dim rpl As MailItem
Set msg = Application.ActiveInspector.CurrentItem
Set rpl = msg.reply
rpl.BodyFormat = olFormatHTML
rpl.Display
Set rpl = Nothing
Set msg = Nothing
End Sub

You can modify the code for forwards by changing set
rpl=msg.Reply
to
set rpl=msg.Forward
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top