Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 09-04-2019, 04:50 AM
gmayor's Avatar
gmayor gmayor is offline How do I run code on all cells in all tables? Windows 10 How do I run code on all cells in all tables? Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,144
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

Code:
Dim tbl As Table
Dim oCell As Cell
    For Each tbl In ActiveDocument.Tables
        With tbl
            For Each oCell In .Range.Cells
                oCell.WordWrap = True
                oCell.FitText = False
            Next oCell
        End With
    Next tbl
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I run code on all cells in all tables? Can I repeat or self-populate cells/tables? pvh PowerPoint 6 05-05-2015 03:21 PM
How do I run code on all cells in all tables? VBA code to format a document containing tables rasika99 Word VBA 3 12-12-2014 04:16 AM
Tables in Powerpoint - Hiding Cells manisfeld PowerPoint 2 06-08-2014 08:17 PM
Tables not populating properly from code DepricatedZero Word VBA 1 06-04-2013 06:22 AM
Shading in Cells in Word Tables Cindy Word Tables 1 01-04-2013 02:38 PM

Other Forums: Access Forums

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