After inserting a stack of pictures into an Outlook email, you may want to change the styles of all the embedded pictures. In this case, you can use the method shared in this article to batch realize this.
To change a picture’s style in email, you can pitch on it. Then, you can change the style at will in “Picture Tools” ribbon, as shown in the screenshot below. It seems quite easy. But, if you want to apply a specific picture style to all embedded pictures in an email, manually changing one by one is a bit troublesome and tedious. Hence, here we’ll introduce a way to realize it in batches, which is much more efficient.
Batch Change All Embedded Pictures’ Styles
- For a start, select or open an email whose pictures you want to edit.
- Then, access Outlook VBA editor according to “How to Run VBA Code in Your Outlook“.
- Next, add the reference to “MS Word Object Library” by following the steps in “How to Add an Object Library Reference in VBA“.
- After that, put the code below into an unused module.
Sub ChangePictureStylesOfAllImages() Dim objMail As Outlook.MailItem Dim objMailDocument As Word.Document Dim objDocSelection As Word.Selection Dim objInlineShape As Word.InlineShape Dim objShape As Word.Shape 'Get the source email Select Case Outlook.Application.ActiveWindow.Class Case olInspector Set objMail = ActiveInspector.CurrentItem Case olExplorer Set objMail = ActiveExplorer.Selection.Item(1) End Select Set objMailDocument = objMail.GetInspector.WordEditor For Each objInlineShape In objMailDocument.InlineShapes With objInlineShape .Borders.Enable = False .Fill.Visible = msoFalse .Line.Visible = msoFalse 'Set "Shadow" With .Shadow .Style = msoShadowStyleOuterShadow .Type = msoShadow21 .ForeColor = WdColor.wdColorBlack .Transparency = 0.5 .Size = 100 .Blur = 15 .OffsetX = 0 .OffsetY = 0 End With 'Set "Reflection" .Reflection.Type = msoReflectionType1 'Set "Glow" .Glow.Radius = 0 'Set "Soft Edges" .SoftEdge.Radius = 0 End With Next End Sub
- Subsequently, run this macro at once via “F5” key button.
- After macro finishes, close the VBA editor.
- Finally, you can return to the source email. In it, all the inserted pictures’ styles have been changed, as shown in the following screenshot.
Protect Your Outlook Data against Corruption
Outlook file is admittedly vulnerable. That is to say, if you don’t take care of your Outlook, Outlook file can be damaged readily. Therefore, you ought to make some precautions, such as watching out for suspicious emails, learning how to use the inbuilt repair tool – Scanpst and getting hold of an experienced external tool, like DataNumen Outlook Repair. With all these, you can safeguard your Outlook data against corruption with ease.
Author Introduction:
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
Leave a Reply