View Single Post
 
Old 03-24-2018, 11:24 PM
Guessed's Avatar
Guessed Guessed is offline Windows 10 Office 2013
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,164
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

You can't wrap text around an inline shape. So you need to convert it to a shape first
Code:
Sub AllShapes()
  ' Sets all selected shapes to Locked Aspect Ratio
  Dim oSh As Shape, oSl As InlineShape
 
   For Each oSh In ActiveDocument.Shapes
      oSh.LockAspectRatio = True
   Next
   For Each oSl In ActiveDocument.InlineShapes
      oSl.LockAspectRatio = True
      oSl.Line.Weight = 2
      oSl.Line.Style = msoLineSingle
      oSl.Line.ForeColor.RGB = RGB(91, 155, 213)
      Set oSh = oSl.ConvertToShape
      oSh.WrapFormat.Type = wdWrapTopBottom
   Next
End Sub
Note that converting the inlineshape to a shape might result in the loop going to every second inline shape. If that is the case, you will need to step backwards through the inline shapes.
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote