I have this code but it does not work all the time. the top part worked once to set the text wrap. but now I get this error:
Error #5941
The requested member of the collection does not exist
I want to highlight an image in the document, then click a Quick Access Toolbar button and have it put a border of 1.5 and text wrap, "tight". and... also text wrap, top and bottom (for another macro)
TIA
DougP
Error #5941
The requested member of the collection does not exist
I want to highlight an image in the document, then click a Quick Access Toolbar button and have it put a border of 1.5 and text wrap, "tight". and... also text wrap, top and bottom (for another macro)
TIA
Code:
Sub ImageAddFrame_TextWrapTB()
' format picture text tight
Selection.InlineShapes(1).ConvertToShape
Selection.ShapeRange.WrapFormat.Type = wdWrapTight
'add border
'With Selection.InlineShapes(1)
Selection.InlineShapes(1).Borders.OutsideLineStyle = wdLineStyleSingle
Selection.InlineShapes(1).Borders.OutsideLineWidth = wdLineWidth150pt
'End With
End Sub
DougP