• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

VBA Auto HTML mail via outlook app

Hi Guys,

I have designed one report (Dashboard) in excel and wrote a code to send it via MS Outlook in mail body.

Challenge I am facing:
1. I am unable to center align the dashboard report in outlook mail body.
2. I am unable to assign a background color to outlook mail body.

I have added a button to send mail in attached excel report file. Please click to see what I have done till now.

Please suggest ways to achieve the desired.
 

Attachments

Change your ".htmlbody" line to something like below.
Code:
  .htmlbody = .htmlbody & "<body style='background-color:#3396FF;'><center><img src='cid:DashboardFile.jpg'</center>"

Change color code to the color you want.
 
Back
Top