Posted by
Andrew Gould
on 26 March 2014
Writing VBA code in Excel doesn't only allow you to control Excel, you also have access to all of the other Office applications. This video looks at how to create emails in Microsoft Outlook by writing code in Excel. You'll learn how to reference the Outlook Object Library, several methods for creating a new instance of the Outlook application and how to create new emails. You'll see how to set basic properties of an email, such as the address and subject and also how to add attachments and make sure that the email includes a signature. The video spends a lot of time talking about the different email formats and how to set the body text of the email according to which format you've chosen; this includes how to write plain text emails, and how to construct basic HTML emails including how to format them. Towards the end the video also shows how to write emails using the Word Editor, allowing you to copy and paste information directly from Excel.
Posted by
Andrew Gould
on 29 August 2017
This video explains how to use the WithEvents keyword to access the Send and Close events of an Outlook MailItem. You'll learn how to use a basic class module to enable access to the events of an object, as well as how to create basic event handlers.
Posted by
Andrew Gould
on 29 April 2019
This video explains how to use the Word Editor of an email created in Outlook to access a range of useful editing features. You'll learn how to create an enmail, how to reference the Word editor and how to work with the Word Range object. You'll use these skills to compose an email consisting of literal text combined with a copied Excel table and chart.
Posted by
Andrew Gould
on 29 April 2019
This video explains how to write VBA code in Excel to insert a picture from a file into an Outlook email. You'll learn how to get a reference to the Word Editor of an Outlook email and use this to create a new Inline Shape object. You also see a few basic techniques for resizing and formatting the picture that you've inserted.
Posted by
Andrew Gould
on 29 April 2019
In this video you'll learn how to loop over the items in the Outlook Inbox folder and write the details of each email into an Excel worksheet. You'll learn how to reference an Outlook Namespace and a default folder, the basics of the Items collection and how to use the WordEditor of an email to paste an embedded Word document into Excel.
Posted by
Andrew Gould
on 29 April 2019
This video explains how to reference and loop over the items in a named folder in Outlook. You'll learn about Outlook's folder structure, how to reference the root folder of an Outlook namespace and how to loop over a collection of folder items, writing the details into a worksheet.
Posted by
Andrew Gould
on 29 April 2019
This video explains how to loop over the folder and subfolder structure in Microsoft Outlook and list the contents of each folder in an Excel worksheet. You'll learn how to set up a recursive procedure to walk through the hierarchy of folders in an Outlook account and how to layout the results using different indent levels in an Excel worksheet.
Posted by
Andrew Gould
on 29 April 2019
This video explains how to save the attachments from a collection of emails in an Outlook folder. You'll learn how to identify which emails have attachments, how to loop over the attachments collection and how to use the SaveAsFile method. You'll also see how to use a FileSystemObject to create a new folder for each email's attachments collection.
Posted by
Andrew Gould
on 29 April 2019
In this video you'll learn how to use the Find method and filters in Outlook to search for an email by sender name and subject. You'll learn how to retrieve a list of items from the Outlook inbox, how to apply the Find method to the Items collection and how to construct a filter string to get a reference to a single item in the collection. You'll also learn of a potential issue with the subject of replies and forwarded messages as well as how to deal with the problem. Finally, you'll learn how to copy the body of an email into an embedded Word document in an Excel worksheet.
Posted by
Andrew Gould
on 07 May 2019
Learn how to reference folders in multiple accounts in the same Outlook profile. This video teaches you how to find the names of each Outlook account folder and how to loop through the Inbox items for each account. You'll also learn what an Outlook Store object is and how you can use it as an alternative way to access another account's inbox.
Posted by
Andrew Gould
on 07 May 2019
This video briefly explains how to choose which account is used to send emails from Outlook using Excel VBA. You'll learn how to list the account names of an Outlook profile and how to use the SendUsingAccount property of an email.
Posted by
Andrew Gould
on 03 June 2019
This video explains how to filter the items in the Outlook inbox using the restrict method. You'll learn about the basic syntax of Jet filters in Outlook and how to apply them to filter a list of emails using a variety of properties such as the importance, size, sender name and received date.
Posted by
Andrew Gould
on 03 June 2019
This video explains how to filter items in Outlook using DASL filter syntax. You'll learn how to reference schema names and property names and how to write filters for a variety of Outlook item properties. You'll learn how to use wildcards and the Like operator to compare strings, how to filter the body text of an email and how to use date filter macros to return items within date periods. In the last part of the video you'll learn a technique for converting local dates and times into UTC dates and times to ensure that your date filters work correctly.
Posted by
Andrew Gould
on 18 August 2021
This video explains how to use VBA to loop through email message files saved in the file system and extract the attachments stored in them. You'll learn how to use the Dir function to find and loop through files, how to use the CreateItemFromTemplate method in Outlook and how to loop through the attachments collection.