Reply using HTML format by Default

B

Brad

Is it possible to always reply to an incoming email
message using HTML format? I realize if I am sent an
email that is text based, I will default to that format.
Can I override this?

Thanks
 
R

Rich Cervenka

Is it possible to always reply to an incoming email
message using HTML format? I realize if I am sent an
email that is text based, I will default to that format.
Can I override this?
When you receive a message in plain text, there is usually a reason
for this: either the sender cannot read HTML or they don't want to.
You should honor their choice and reply in the format that they use in
your response.

Best regards.
--
Rich Cervenka
Chicago, Illinois, USA
Email Client: Microsoft Outlook 2002/2003
News Client (Text): Forté Agent 1.93 www.forteinc.com
News Client (Binaries): News Rover 9.0 www.newsrover.com
 
K

Ken Isaacson

On my end, I have my computer configured so I only receive email in plain
text -- this is to avoid inadvertently triggering hidden html tags that let
the sender (i.e. spammer) that my address is a valid one. (There's a
registry edit to receive mail only in plain text..)

That being said, I correspond with my known contacts in html. And I'd like
to respond to them that way.

In my case, it's not true that the friendly sender can't read html or
doesn't want to.

So.... to pose the question again: When one receives email in plain text,
can the reply default to html?

Thanks.
Ken
 
K

Ken Isaacson

Question: The reason I have Outlook set to receive all emails in plain text
is to avoid triggering hidden HTML tags in some undesired emails. Will the
routine you posted (or the alternate routine by Michael Demaree), which as I
understand it, converts the email that you're replying to into HTML,
undermine this?

Thanks.

Ken
Outlook has no such feature, but I've posted some VBA code at
http://www.outlookcode.com/codedetail.aspx?id=47 that you might find useful.
--
Sue Mosher, Outlook MVP
Outlook and Exchange solutions at http://www.slipstick.com
Author of
Microsoft Outlook Programming: Jumpstart
for Administrators, Power Users, and Developers
 
S

Sue Mosher [MVP]

No, because if you are using the feature to receive all mail as plain text, the original HTML content is hidden.
--
Sue Mosher, Outlook MVP
Outlook and Exchange solutions at http://www.slipstick.com
Author of
Microsoft Outlook Programming: Jumpstart
for Administrators, Power Users, and Developers
 
K

Ken Isaacson

Thanks.

OK, now, I cut-and-pasted the code into the ThisOutlookSession place in
Outlook's VBA editor, open up a message from my Inbox, hit alt-F8, which
opens a macro box. I choose to run the macro and get an "Invalid procedure
call or argument."

If it means anything, the cursor is at "GetCurrentItem()" in line 4, between
"Get" and "Current"

Any idea what the problem is?

Thanks.
Ken
No, because if you are using the feature to receive all mail as plain text,
the original HTML content is hidden.
--
Sue Mosher, Outlook MVP
Outlook and Exchange solutions at http://www.slipstick.com
Author of
Microsoft Outlook Programming: Jumpstart
for Administrators, Power Users, and Developers
 
S

Sue Mosher [MVP]

Maybe a dumb question, but did the code you pasted include the GetCurrentItem function?
--
Sue Mosher, Outlook MVP
Outlook and Exchange solutions at http://www.slipstick.com
Author of
Microsoft Outlook Programming: Jumpstart
for Administrators, Power Users, and Developers
 
K

Ken Isaacson

It may be a dumb question to you :) but since I haven't a clue what I'm
doing while in VBA editor, I can't even answer it. So, I'll paste below
what I pasted there:

Sub ReplyInHTML()
Dim objItem As Object
Dim objReply As MailItem
Set objItem = GetCurrentItem()
If objItem.GetInspector.EditorType <> olEditorHTML Then
' Outlook 2002 can substitute the next statement
' for the above If statement
'If objItem.BodyFormat <> olFormatHTML Then
objItem.HTMLBody = Replace(objItem.Body, vbCrLf, "<br>")
End If
Set objReply = objItem.Reply
objReply.Display
Set objItem = Nothing
Set objReply = Nothing
End Sub

Function GetCurrentItem() As Object
Dim objApp As Application
Set objApp = CreateObject("Outlook.Application")
On Error Resume Next
Select Case TypeName(objApp.ActiveWindow)
Case "Explorer"

Does that answer the question?

Thanks.
Ken

Maybe a dumb question, but did the code you pasted include the
GetCurrentItem function?
--
Sue Mosher, Outlook MVP
Outlook and Exchange solutions at http://www.slipstick.com
Author of
Microsoft Outlook Programming: Jumpstart
for Administrators, Power Users, and Developers
 
S

Sue Mosher [MVP]

You apparently didn't include the entire GetCurrentItem() function, which should end with the statement "End Function."

It always makes me nervous when people start messing with VBA without understanding even the basics. You might want to do a little background reading, starting at http://www.slipstick.com/dev/vb.htm#tutorials.
--
Sue Mosher, Outlook MVP
Outlook and Exchange solutions at http://www.slipstick.com
Author of
Microsoft Outlook Programming: Jumpstart
for Administrators, Power Users, and Developers
 
K

Ken Isaacson

Oops. Didn't paste the whole thing in my last post. Here's the whole
thing, which appears to have the "End Function" you mentioned. Sorry for
the goof. Now what?

Sub ReplyInHTML()
Dim objItem As Object
Dim objReply As MailItem
Set objItem = GetCurrentItem()
If objItem.GetInspector.EditorType <> olEditorHTML Then
' Outlook 2002 can substitute the next statement
' for the above If statement
'If objItem.BodyFormat <> olFormatHTML Then
objItem.HTMLBody = Replace(objItem.Body, vbCrLf, "<br>")
End If
Set objReply = objItem.Reply
objReply.Display
Set objItem = Nothing
Set objReply = Nothing
End Sub

Function GetCurrentItem() As Object
Dim objApp As Application
Set objApp = CreateObject("Outlook.Application")
On Error Resume Next
Select Case TypeName(objApp.ActiveWindow)
Case "Explorer"
Set GetCurrentItem = objApp.ActiveExplorer.Selection.Item(1)
Case "Inspector"
Set GetCurrentItem = objApp.ActiveInspector.CurrentItem
End Select
Set objApp = Nothing
End Function




You apparently didn't include the entire GetCurrentItem() function, which
should end with the statement "End Function."

It always makes me nervous when people start messing with VBA without
understanding even the basics. You might want to do a little background
reading, starting at http://www.slipstick.com/dev/vb.htm#tutorials.
--
Sue Mosher, Outlook MVP
Outlook and Exchange solutions at http://www.slipstick.com
Author of
Microsoft Outlook Programming: Jumpstart
for Administrators, Power Users, and Developers
 
S

Sue Mosher [MVP]

If it were my machine, I'd try stepping through the code for clues. Put the curson in the ReplyInHTML function, then press F8.
--
Sue Mosher, Outlook MVP
Outlook and Exchange solutions at http://www.slipstick.com
Author of
Microsoft Outlook Programming: Jumpstart
for Administrators, Power Users, and Developers
 

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