Hans helped me with this macro to add a standard border and shadow to a selected picture. I am successfully running it in Word 2010, but now want to run it in Outlook too. I thought I could copy the macro into a module in Outlook, but it does not run. Can anyone assist with how to get it to run on a selected picture in a new email message.
TX
Code: Select all
Sub FormatPicture()
Dim p As Object
If Selection.InlineShapes.Count = 1 Then
Set p = Selection.InlineShapes(1)
ElseIf Selection.ShapeRange.Count = 1 Then
Set p = Selection.ShapeRange(1)
Else
MsgBox "Please select a single shape or inline shape.", vbExclamation
Exit Sub
End If
With p.Shadow
.Blur = 4
.OffsetX = 3
.OffsetY = 3
.Size = 100
.Style = msoShadowStyleOuterShadow
.Transparency = 0.57
.Visible = True
End With
With p.Line
.Weight = 1
.ForeColor = vbBlack
End With
End Sub