Thread: [Solved] Formatting picture
View Single Post
 
Old 11-20-2020, 01:06 PM
gmaxey gmaxey is offline Windows 10 Office 2016
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,428
gmaxey is a jewel in the roughgmaxey is a jewel in the roughgmaxey is a jewel in the roughgmaxey is a jewel in the rough
Default

Because floating objects are not inlineshapes.


Code:
Sub AddBorderToShape()
Dim oShp As Shape
  On Error Resume Next
  Set oShp = Selection.ShapeRange(1)
  MsgBox Err.Number
  If Err.Number <> 0 Then Exit Sub
  With oShp
    .Line.ForeColor.RGB = RGB(0, 0, 0)
    .Line.Weight = 4
    .Line.DashStyle = msoLineSolid
  End With
End Sub
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote