Quote:
Originally Posted by sts023
OK, I realise that - the issue is that I'm doing what works when the macro recorder is used, but it doesn't work when transferred to vba. I'm trying to find VBA to do what the macro recorder does when it is used to record my actions.
|
Whatever the macro recorder records
is VBA - and it's generally pretty reliable. Conversely, it's as dumb as a box of rocks and would be incapable of generating code as complex as that in your first post. There are also many actions it won't record.
Quote:
Originally Posted by sts023
Thats the problem - without the recorder I'm not well enough versed in Word VBA to know what the "native" commands are.
|
Time to get into the Word Object model and start learning.
As for the immediate problem, edit your With tblDiner ... End with block by adding:
Code:
With tblDiner
' ...
.Range.ParagraphFormat.SpaceAfter = 0
.Rows.HeightRule = wdRowHeightAuto
End With
Better than using '.ParagraphFormat.SpaceAfter = 0' would be to apply an appropriate paragraph Style to the table.