Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #10  
Old 05-12-2019, 05:10 PM
macropod's Avatar
macropod macropod is offline Problems formatting a Word 2010 table using VBA Windows 7 64bit Problems formatting a Word 2010 table using VBA Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
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
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Does sending a W10 Word 2016 template to someone with a W7 Word 2010 system cause problems? dianahbr Word 4 03-06-2018 02:27 PM
Word 2011 for Mac - problems with table of contents tepose Word 1 09-28-2014 03:36 PM
Problems formatting a Word 2010 table using VBA Many Corruption Problems Word 2010 sleake Word 2 07-25-2013 07:20 PM
Copy & paste problems Word 2010 pjm333 Word 2 02-13-2013 04:52 AM
Problems formatting a Word 2010 table using VBA Spacing problems with word 2010 Microsoftenquirer1000 Word 5 06-25-2012 12:01 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 05:30 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft