Copy Excel range as Picture to Outlook

To get better picture on Outlook, work with Word object model with MailItem.GetInspector Property (Outlook) Example Option Explicit Public Sub Example() Dim rng As Range Dim olApp As Object Dim Email As Object Dim Sht As Excel.Worksheet Dim wdDoc As Word.Document Set Sht = ActiveWorkbook.Sheets(“Dashboard”) Set rng = Sht.Range(“B4:L17”) rng.CopyPicture Appearance:=xlScreen, Format:=xlPicture With Application .EnableEvents … Read more

Reading e-mails from Outlook with Python through MAPI

I had the same problem you did – didn’t find much that worked. The following code, however, works like a charm. import win32com.client outlook = win32com.client.Dispatch(“Outlook.Application”).GetNamespace(“MAPI”) inbox = outlook.GetDefaultFolder(6) # “6” refers to the index of a folder – in this case, # the inbox. You can change that number to reference # any other … Read more

How do I format a String in an email so Outlook will print the line breaks?

I’ve just been fighting with this today. Let’s call the behavior of removing the extra line breaks “continuation.” A little experimenting finds the following behavior: Every message starts with continuation off. Lines less than 40 characters long do not trigger continuation, but if continuation is on, they will have their line breaks removed. Lines 40 … Read more