F
Fred Holmes
Word 2003, WinXP, SP2
The following code works just fine to set properties in a single cell,
setting only the first cell if multiple cells have been selected.
With Selection.Cells(1) ' Processes single cell.
.TopPadding = InchesToPoints(0.02)
.BottomPadding = InchesToPoints(0#)
.LeftPadding = InchesToPoints(0.05)
.RightPadding = InchesToPoints(0.05)
.WordWrap = True
.FitText = False
End With
I'm trying to get the code to run on all selected cells. The
following code and other, simliar tries bombs.
Dim c As Cell
For Each c In Selection.Cells
.TopPadding = InchesToPoints(0.02)
.BottomPadding = InchesToPoints(0#)
.LeftPadding = InchesToPoints(0.05)
.RightPadding = InchesToPoints(0.05)
.WordWrap = True
.FitText = False
Next c
"Compile error:
Invalid or unqualified reference"
Thanks for your help,
Fred Holmes
The following code works just fine to set properties in a single cell,
setting only the first cell if multiple cells have been selected.
With Selection.Cells(1) ' Processes single cell.
.TopPadding = InchesToPoints(0.02)
.BottomPadding = InchesToPoints(0#)
.LeftPadding = InchesToPoints(0.05)
.RightPadding = InchesToPoints(0.05)
.WordWrap = True
.FitText = False
End With
I'm trying to get the code to run on all selected cells. The
following code and other, simliar tries bombs.
Dim c As Cell
For Each c In Selection.Cells
.TopPadding = InchesToPoints(0.02)
.BottomPadding = InchesToPoints(0#)
.LeftPadding = InchesToPoints(0.05)
.RightPadding = InchesToPoints(0.05)
.WordWrap = True
.FitText = False
Next c
"Compile error:
Invalid or unqualified reference"
Thanks for your help,
Fred Holmes