Solved

VBA Outlook Send E-mail as HTML

Posted on 2013-01-24
6
564 Views
Last Modified: 2013-02-09
Hi,

I am sending an e-mail from Outlook using vba. I use the HTMLBody property so the e-mail text is formatted using HTML.

The code works fine and send me a e-mail fine. Format is fine. However when I send it to a group of people the e-mail displays all the HTML tags and just looks like a load of gibberish!

Can someone please tell me how to fix this?

Thanks,
M
0
Comment
Question by:mcs26
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
6 Comments
 
LVL 76

Accepted Solution

by:
David Lee earned 500 total points
ID: 38817064
Hi, mcs26.

The HTMLBody property contains the HTML, but doesn't set the email format to HTML.  Are you also setting the BodyFormat property to olFormatHTML?
0
 
LVL 59

Expert Comment

by:Chris Bottomley
ID: 38817490
'M'


I have nothing to add as I too believe the bodyformat will resolve your issue .. if not then of course get back to us, (an example of your code will help).  My primary purpose is to say ...

David

Long time no see, I trust you are well?

Chris
0
 
LVL 76

Expert Comment

by:David Lee
ID: 38818178
Hey, Chris.

I got busy with some other things and stopped answering questions altogether for just over a year.  Decided it was time to get back in the game.  I am well, thanks.  How about yourself?

Cheers!

David
0
 
LVL 59

Expert Comment

by:Chris Bottomley
ID: 38818223
Well also but slowed down a lot on the site, (general weight of work / pace of life) see you around no doubt.

mcs26 ... back to you ;o)

Chris
0
 

Author Comment

by:mcs26
ID: 38830777
Hi Guys,

Sorry for the delay in getting back to you. Turns out the issue was when I sent the e-mail to a group using the group distribution name it would not send the e-mail as html. However if I sent the e-mail and listed the individual users (8 people) it works fine.

No idea why that is but now works so happy now!

Cheers,
M
0

Featured Post

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
Originally, this post was published on Monitis Blog, you can check it here . Websites are getting bigger and more complicated by the day. Video, images and custom fonts are all great for showcasing your product or service. But the price to pay in…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question