Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 12-07-2021, 01:16 PM
Ulodesk Ulodesk is offline Need a macro adjustment Windows 10 Need a macro adjustment Office 2016
Word 2013 Expert Cert
Need a macro adjustment
 
Join Date: Sep 2009
Location: Virginia
Posts: 872
Ulodesk is on a distinguished road
Default Need a macro adjustment

Hi. I have this macro from previous assistance. I am working on a document now with tons of tables that is set up differently. I need the tables -- even better would two specific table styles, which are N-Table1 and N-Table2 -- to be:
left-aligned,
indented 0.3 inches, and
7.2" wide



Code:
Sub TablesResizeAll()
'
' Resizes all tables in document to 6.5" wide, centered
'
    Dim oTbl As Table
    For Each oTbl In ActiveDocument.Tables
        oTbl.AutoFitBehavior wdAutoFitFixed
        With ActiveDocument.PageSetup
            oTbl.PreferredWidth = .PageWidth - .LeftMargin - .RightMargin
            oTbl.Rows.Alignment = wdAlignRowCenter
        End With
    Next oTbl
End Sub
Many thanks!
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Need a macro adjustment Macro adjustment needed Ulodesk Word VBA 2 02-06-2020 06:49 AM
IF Statement Adjustment shawn.low@cox.net Mail Merge 0 09-23-2019 10:08 AM
Can I disable auto adjustment of sizes in Smart art Hierarchy charts? frankgoldman PowerPoint 1 05-04-2019 04:37 AM
Need a macro adjustment Automatic adjustment date zbiku25 Project 3 02-28-2017 09:03 AM
Need a macro adjustment Table adjustment on Surface OneNote TheMax OneNote 1 01-23-2015 04:33 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 08:33 PM.


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