- How to compose an email in microsoft outlook 2015 how to#
- How to compose an email in microsoft outlook 2015 code#
But this is somewhat old fashioned and I would rather discourage it because it creates a tight coupling between individual email text elements and their formatting.Īs in general web design, the better way to do this is to use Cascading Style Sheets (CSS). We could simply use the formatting properties of basic HTML like foo to create formatting. We could now send the email, as in my simple sample by using Mailitem.Send.īut I would like to go a bit deeper with this sample and add some additional formatting to the email. Other than for plain text emails we need to use the HTMLBody-Property. The storage and retrieval of the text is not subject of this article therefore I will abstract this away and just assume there is a function GetHTMLText that returns the HTML as a string.Īfter we have created the body of the email we have to indicate that we want to send a HTML-email by setting the BodyFormat-Property accordingly and by setting the body of the Mailitem. You could store the HTML text for the email in a field in a table or in the text file. A simple HTML text for our email could look like this: If you are familiar with HTML you can also use any plain text editor, even Notepad will do.
How to compose an email in microsoft outlook 2015 code#
You can use any HTML-editor to create the html code of the body. Instead of the normal plain text email message, I showed in the original sample, we will use an HTML-formatted text as body. You create an Outlook application object, then create a MailItem object, set the sender and recipient addresses, and a subject.
How to compose an email in microsoft outlook 2015 how to#
The basic creation of the email is similar to the code in my article on how to create emails by Outlook automation. You need to have Microsoft Outlook 2007 (or newer) installed for the sample to work. This article describes how to create an html email from your Microsoft Access application, how to add CSS formatting and include inline images in the email. Those email apps may indeed be the future, and Mailbox holds a special place in my heart for its sheer beauty and handiness for whittling away at your inbox - but for most users, it's too much too soon.Įmail is one of those areas where radical change to the experience can cause headaches, stress, or missed meetings, and Outlook wins out against its competitors because it's currently the perfect combination of new features and familiarity.How to create HTML-emails with Microsoft Access and Outlook automation I've been using Outlook for a week now, which is usually when I begin to realize the limitations of other email apps like Google Inbox or Mailbox that are seeking to reinvent how we use email. There's even a dedicated Files tab that shows you all your attachments and files on your device and emailed to you, and a similar People tab that shows you who you've been emailing recently so you can jump right into composing a new email without searching through your contacts. Want to only see your unread emails? Outlook's Quick Filter button makes it easy to filter between flagged and unread emails, and you can also choose to only see emails with files attached.