ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

Main Area and Open Discussion > General Software Discussion

How to add an exception for logo in signature to Outlook VBA

(1/1)

questorfla:
The following Outlook VBA is used to resize all images pasted to the body of an email by 50% scale.  Works great for copy&paste screenshots that are too large for an email page size.

Unfortunately, it doesn't stop with the body of the email but continues on to shrink the logo.jpg in the email signature.  Is there an easy way to exempt the signature portion of the email or other possible options that would allow the VBA to work as it should on all images other than the one in the signature?


--- ---Sub ResizeAllPicsTo50Pct()
    Const wdInlineShapePicture = 3
    Dim olkMsg As Outlook.MailItem, wrdDoc As Object, wrdShp As Object
    Set olkMsg = Application.ActiveInspector.CurrentItem
    Set wrdDoc = olkMsg.GetInspector.WordEditor
    For Each wrdShp In wrdDoc.InlineShapes
        If wrdShp.Type = wdInlineShapePicture Then
            wrdShp.ScaleHeight = 50
            wrdShp.ScaleWidth = 50
        End If
    Next
    Set olkMsg = Nothing
    Set wrdDoc = Nothing
    Set wrdShp = Nothing
End Sub

Navigation

[0] Message Index

Go to full version