I recorded a macro to select a table and insert .03″ left padding into all cells (using the Cell Options dialog). Aftrer recording it, everything looks fine, all the cells have the same .03″ of left padding. But when I run the macro on any other table in the same file (I have a file with many similar tables) the change doesn’t take.
I made sure I used only the keyboard when recording the macro. I also had the same results when recording a similar macro that selects just a column, rather than the whole table.
I don’t know VBA well enough to write custom macros, but here’s what it looks like for anyone who can detect a problem with it.
Sub Tablespace()
‘
‘ Tablespace Macro
‘ Macro recorded 9/5/2002 by George Tipton
‘
Selection.Tables(1).Select
With Selection.Tables(1)
.TopPadding = InchesToPoints(0.01)
.BottomPadding = InchesToPoints(0.01)
.LeftPadding = InchesToPoints(0.03)
.RightPadding = InchesToPoints(0.01)
.Spacing = 0
.AllowPageBreaks = True
.AllowAutoFit = True
End With
With Selection.Cells(1)
.TopPadding = InchesToPoints(0.01)
.BottomPadding = InchesToPoints(0.01)
.LeftPadding = InchesToPoints(0.03)
.RightPadding = InchesToPoints(0.01)
.FitText = False
End With
End Sub
-
Cell property not obeying recorded macro (2002/SP-1)
- This topic has 11 replies, 5 voices, and was last updated 22 years, 8 months ago.
AuthorViewing 1 reply threadAuthorViewing 1 reply thread