Hi guys,
I have a question. The following macro works to reset all margins on shapes, but I have to put it in a loop and repeat it 3 or 4 times to get table margins to be set to zero. Any idea why?
Am I doing something wrong?
[vba]
Sub ResetMargins()
On Error GoTo Nirvana
With ActiveWindow.Selection.ShapeRange
.TextFrame.MarginLeft = 0
.TextFrame.MarginRight = 0
.TextFrame.MarginTop = 0
.TextFrame.MarginBottom = 0
End With
Nirvana:
End Sub
[/vba]
EDIT: Actually the loop isn't working either. If I manually run the macro a few times, it works, but not via a loop. What the heck is going on?