#1   Report Post  
lloydkirk lloydkirk is offline
Junior Member
 
Posts: 0
Default Global Table Change

I have a document with in excess of 100 tables. I would like to do the following: globally change the margins of all of the current tables in the document at one fell swoop, and set the default for all future tables to have the same orientation (center) as well as margins. Any ideas?
Thanks in advance.
Jeff
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Stefan Blom[_3_] Stefan Blom[_3_] is offline
external usenet poster
 
Posts: 6,897
Default Global Table Change

To change the defaults, modify the table style you are using.

To modify existing tables, you will need a macro. Something like this should
work:

Sub ChangeCellMarginsAllTables()
Dim t As Table
Dim r As Cell
For Each t In ActiveDocument.Tables
For Each r In t.Range.Cells
r.TopPadding = XX
r.LeftPadding = XX
r.RightPadding = XX
r.BottomPadding = XX
Next r
Next t
End Sub

"XX" represents values in points. You can use InchesToPoints(value) to have
VBA do the conversion for you.

For assistance with macros, see http://www.gmayor.com/installing_macro.htm.

--
Stefan Blom
Microsoft Word MVP




"lloydkirk" wrote in message
...

I have a document with in excess of 100 tables. I would like to do the
following: globally change the margins of all of the current tables in
the document at one fell swoop, and set the default for all future
tables to have the same orientation (center) as well as margins. Any
ideas?
Thanks in advance.
Jeff




--
lloydkirk


Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Global Font Change Gordon Padwick Formatting Long Documents 8 November 28th 09 02:03 PM
Global Font Change Gordon Padwick Formatting Long Documents 0 November 21st 09 11:16 PM
When I format a paragraph, why is it a global change? John Microsoft Word Help 2 August 13th 08 09:27 PM
Global Change Me Microsoft Word Help 2 December 19th 06 09:06 AM
Change of E-mail address change - Global Search/Replace Janet New Users 1 January 11th 05 08:28 PM


All times are GMT +1. The time now is 11:04 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"