Title: AutoHotkey Webinar- Automating MS Outlook and COM

In our first hour of today’s  AutoHotkey webinar we talked about various ways you can automate MS Outlook.  We covered the below scripts:

  1. Creating an HTML email (Also see this video)
  2. Performing mail-merge on the above HTML email
  3. Integrating a mail-merge from an active Excel file  (Also see this video)
  4. Looping over emails in a folder
  5. Creating appointments in Outlook
  6. Creating an address book from looping over emails in Outlook

The second hour dove a bit deeper into using Outlook and Excel.  We also talked through a few user’s questions.

Below is the information that was reviewed in the PowerPoint deck we reviewed:

Script Highlight:

Sift by FanaticGuru uses Regular Expressions and nGrams* to fuzzy match strings

*n-gram is a contiguous sequence of n items

COMComponent Object Model

  • What is COM?
  • Some of the programs COM integrates with:

Creating an HTML email in Outlook with AutoHotkey

  1. Connect to Outlook or Create a new one (but may not deploy right then)
  2. Create a New Mail Item object
  3. Provide values for properties
    1. Specify Account Sending from
    2. Type of email (HTML, RTF, Text)  (Search here for Outlook Constants)
    3. Identify Recipients: To, CC, BBC
    4. Subject line
    5. HTML Body
    6. Attachments
    7. Delivery time (Fuse)
    8. Request Delivery Reciept
    9. Importance
    10. Display / Send
  4. Convert above email to mail-merge with names & email addresses

Resources

AHK Forum:

MSDN resources:

Outlook examples on the-Automator

Stack Overflow

AutoHotkey webinar on COM & Excel

AutoHotkey Webinar- Various ways to use AHK to automate tasks in Windows

In the first hour of our March AutoHotkey webinar we covered core concepts of what to consider when writing a script.AutoHotkey webinar

The second hour we took a deeper dive into coding using some of the methods mentioned in hour one.

Content & Resources shared in AutoHotkey webinar

Script highlight:  Copy Explorer path to clipboard

Things to Consider when writing a NEW script

  1. Are you behind a time-crunch to get the job done?
  2. Are you looking for a 1-time solution?
    1. What are the odds that you could re-purpose your solution for something else at a later date?
  3. Will this be run on multiple:
    1. Computers
    2. Windows versions
    3. Users
    4. What software is also running on computers
    5. Bitness (32 & 64) of OS, AutoHotkey , program interacting with
  4. Is there existing code that you can borrow / steal / leverage?
    1. Previous code I’ve written
    2. Sites like:  AHK Forum  Stack Overflow  Reddit  Github  the-Automator  JSZApp  Jack Dunning Blog
    3. Ask colleagues / friends / Social channels
      1. AHK Forum   StackOverflow    Reddit
      2. LinkedIn 1  LinkedIn 2
      3. Facebook 1  Facebook2  Facebook 3
      4. Joe Glines  Jackie Sztuk  Hellbent  ahkTuts AboutScript  Chunjee  AHK vids
  5. Will someone other than you be using / maintain the code? Program to their “level”

Many ways to “Control / Interact” Window’s programs

Example Scripts used during Coding demonstration of AutoHotkey webinar