×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

sending a formatted email in Access 2016 VBA using Outlook Template

sending a formatted email in Access 2016 VBA using Outlook Template

sending a formatted email in Access 2016 VBA using Outlook Template

(OP)
Hi,
I've been successful in sending emails using Outlook templates (oft) for only text and hyperlinks. But now I have a template that contains a table with images and text in the table and it only creates the email with the text remaining in the email. Is there something else that has to be done in the VBA to have it bring in the whole template as is? Specific fonts and images where they appear?

Thanks!

RE: sending a formatted email in Access 2016 VBA using Outlook Template

(OP)
I have decided to just add an attachment to the email in the VBA code so that I can maintain some formatting for the user. But I'd like to maintain the format the text that remains in the template email, such as Bold, font size, text fields that are hyperlinks (now the text is replaced with the fully qualified URL in the body of the email with the <> at beginning and end.

I tried adding .BodyFormat = olFormatHTML but what actually goes in the body of the email is the template itself. I add that by coding:
Set objOutlookMsg = objOutlook.CreatItemFromTemplate(template_email) which is the directory of the .oft file
sample code:
With objOutlookMsg
(set the recipients...
.Subject = "blah, blah, "
.BodyFormat = olFormatHTML
.Attachements.Add (attachment_path
etc, etc

Any ideas would be appreciated! I was really hoping all the formatted information that I originally would have in the body of the template (format and all, including just a regular table format to group instructions) would come through from the template.oft file.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close