Some users hope to bulk insert the same picture, such as a logo image, into multiple draft emails, instead of manually inserting one by one. This article will focus on this need and share a method to realize it.
At times, you may need to insert a specific image into multiple emails in Outlook. For instance, to make your emails more official, you want to insert your company logo into all of your draft emails. In this case, of course you can choose to achieve this manually. But it is quite troublesome. Therefore, you had better make use of some more effective means, such as the following one.
Batch Insert the Same Picture into Multiple Emails
- At the very outset, launch your Outlook application.
- Then, in Outlook, you need to access Outlook VBA editor. As for the elaborate operations, you can refer to this article – “How to Run VBA Code in Your Outlook”.
- Next, you ought to copy the following VBA code into the “ThisOutlookSession” project or a module.
Sub BatchInsertImageIntoMultipleEmails() Dim objSelection As Outlook.Selection Dim strImageFile As String Dim i As Long Dim objMail As Outlook.MailItem Dim objInspector As Outlook.Inspector Dim objMailDocument As Object Dim objMailRange As Object Dim objImage As Object 'Get All selected emails Set objSelection = Outlook.Application.ActiveExplorer.Selection If Not (objSelection Is Nothing) Then 'Specify the concrete path to the image file strImageFile = "E:\DataNumen Products\logo.jpg" For i = objSelection.count To 1 Step -1 If objSelection(i).Class = olMail Then Set objMail = objSelection(i) With objMail .BodyFormat = olFormatHTML Set objInspector = .GetInspector Set objMailDocument = objInspector.WordEditor .Display 'Insert the image into the body Set objMailRange = objMailDocument.Range(0, 0) Set objImage = objMailRange.InlineShapes.AddPicture(filename:=strImageFile, LinkToFile:=False, SaveWithDocument:=True) 'Resize the image objImage.ScaleHeight = 30 objImage.ScaleWidth = 30 'Insert a new line below the image Set objMailRange = objImage.Range objMailRange.Collapse 0 objMailRange.Text = vbCrLf 'Save & Close the emails .Save .Close 1 End With End If Next End If End Sub
- Subsequently, you can exit the current window.
- After that, you can add the macro to Quick Access Toolbar.
- Finally, you can run the macro.
- First off, select all the emails which you want to insert the specific image to.
- Then, click the macro in Quick Access Toolbar.
- When macro finishes, the image have been inserted into all the emails.
Keep a Potent Repair Tool Handy
Outlook is vulnerable, so you have to spend lots of time and efforts safeguarding your Outlook data files. One of the most important actions is to back up your PST file regularly. Also, if possible and affordable, you had better get hold of a robust and effective Outlook recovery tool, like DataNumen Outlook Repair. It’ll come in handy definitely.
Shirley Zhang is a data recovery expert in DataNumen, Inc., which is the world leader in data recovery technologies, including corrupted mdf and outlook repair software products. For more information visit www.datanumen.com