Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 03-27-2021, 06:33 PM
Cendrinne's Avatar
Cendrinne Cendrinne is offline Need Help to Script to align all the tables only as of a section to end of doc? Windows 10 Need Help to Script to align all the tables only as of a section to end of doc? Office 2019
Competent Performer
Need Help to Script to align all the tables only as of a section to end of doc?
 
Join Date: Aug 2019
Location: Montreal Quebec Canada
Posts: 200
Cendrinne is on a distinguished road
Default Need Help to Script to align all the tables only as of a section to end of doc?

Hello Word VBA pros,



I'm trying to script to have all tables, as of the active Section, (so this point forward), to have all tables with a LeftIndent of 0.38 InchesToPoints.

This is what I've came up with, but it doesn't work.

Need help to fix it up, Please

HTML Code:
 Application.ScreenUpdating = False
    Dim aTbl As Table
    Dim oSec As Section
    Dim oRng As range
    
    For Each aTbl In ActiveDocument.Tables
      Set oRng = oSec.range

       aTbl.Rows.Alignment = wdAlignRowLeft
       aTbl.Rows.LeftIndent = InchesToPoints(0.38)
       aTbl.Rows.WrapAroundText = False
  Next aTbl
  
Application.ScreenUpdating = True
  On Error GoTo 0
Any help, would be greatly appreciated.

Thanks again,

Cendrinne

Last edited by Cendrinne; 03-27-2021 at 08:41 PM.
Reply With Quote
 

Tags
align tables in section, help please



Similar Threads
Thread Thread Starter Forum Replies Last Post
Something in header with text boxes won't let a section align vertically - sometimes ryannah05 Word 5 04-10-2020 09:48 AM
Need Help to Script to align all the tables only as of a section to end of doc? vba script to align text to the center olybobo Excel Programming 1 05-26-2016 01:09 AM
Script starts nesting tables without reason selman555 Word VBA 1 10-17-2014 01:01 AM
Need Help to Script to align all the tables only as of a section to end of doc? How to format and align multiple tables in a document in bulk? Joey Cheung Word Tables 1 08-08-2014 11:34 PM
Need Help to Script to align all the tables only as of a section to end of doc? How to right align section numbers in TOC? Dr Wu Word 1 01-03-2014 02:07 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 09:54 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