View Single Post
 
Old 05-12-2019, 05:10 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Quote:
Originally Posted by sts023 View Post
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 View Post
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.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote