View Single Post
 
Old 06-02-2023, 09:13 PM
Guessed's Avatar
Guessed Guessed is offline Windows 10 Office 2016
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

Try this version. I'm not sure how it will go with subgroups but it appears that you can the set wrapping for multiple selected graphics in a single line and when shapes are ungrouped they inherit the parents wrapping setting.
Code:
Sub Graph_CONVERT_TxtBox_to_WrapSquare_and_Ungroup()
  Dim aShp As Shape
  Selection.Range.ShapeRange.WrapFormat.Type = wdWrapSquare
  For Each aShp In Selection.Range.ShapeRange
    If aShp.Type = msoGroup Then aShp.Ungroup
  Next aShp
End Sub
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote