If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
how do you change the margin of all tables in a document at once?
I have a several hundred page document which is formated for landscape and
contains several hundred individual tables. When I convert the document to portrait the right margin of all the tables is not off the page and out of sight and the text is truncated. How do I get the right margin of all the tables to conform to the portrait margins without individually selecting each table, one at a time, and moving its margin? |
#2
|
|||
|
|||
how do you change the margin of all tables in a document at once?
You could try this:
Make a backup copy of your document (just in caseā¦). Install and run the macro below: Sub AdjustTableWidth() Dim oTable As Table For Each oTable In ActiveDocument.Tables With oTable .PreferredWidthType = wdPreferredWidthPercent .PreferredWidth = 100 End With Next oTable End Sub The macro iterates through all tables in the document and sets the preferred table width to 100% (I assume that the tables are currently aligned to the left margin). This should make the tables fit between the left and right margins - corresponds to setting Table Table Properties Table tab Pre-ferred width to 100%. However, since I don't know how your tables are set up, I cannot guarantee that the result is exactly as you wish (but then you have your baskup...). For help on installing macros, see: http://www.gmayor.com/installing_macro.htm -- Regards Lene Fredborg DocTools - Denmark www.thedoctools.com Document automation - add-ins, macros and templates for Microsoft Word "+Brian" wrote: I have a several hundred page document which is formated for landscape and contains several hundred individual tables. When I convert the document to portrait the right margin of all the tables is not off the page and out of sight and the text is truncated. How do I get the right margin of all the tables to conform to the portrait margins without individually selecting each table, one at a time, and moving its margin? |
Thread Tools | |
Display Modes | |
|
|