Thread: [Solved] Need a macro adjustment
View Single Post
 
Old 12-07-2021, 05:37 PM
Guessed's Avatar
Guessed Guessed is offline Windows 10 Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,166
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

OK, if standardising your tables more comprehensively is not what you want then you can just set the alignment without restyling.
Code:
Sub TablesResizeAll()
  Dim oTbl As Table
  For Each oTbl In ActiveDocument.Tables
    oTbl.AutoFitBehavior wdAutoFitFixed
    oTbl.PreferredWidthType = wdPreferredWidthPoints
    oTbl.PreferredWidth = InchesToPoints(7.2)
    oTbl.Rows.Alignment = wdAlignRowLeft
    oTbl.Rows.LeftIndent = InchesToPoints(0.3)
  Next oTbl
End Sub
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote