Re: Quick way to adjust table cell margins

Tech-Archive recommends: Speed Up your PC by fixing your registry



Cindy:
Thanks for your input.

It is true you can select the entire column of a table by:
ActiveDocument.tables(2).columns(1).selection

However, the methods and properties are limited and not the same as the WORD
user interface. For example, one cannot set the left margin of all cells in
a particular column through VBA (leftpadding property is not available) on
existing WORD tables. It is only available on a indivdual cell basis.
Therefore, one would have to naviagate each cell in a column which is
prohibitively intensive for a large table.

Any other ideas?


"Cindy M -WordMVP-" wrote:

> Hi =?Utf-8?B?RGVubmlzIFM=?=,
>
> > I need to adjust the cell margins for all cells in a table. Through the user
> > interface it appears this can be done by selecting the column(s) of the table
> > and adjusting the table cell properites (i.e. Table>Table Properties...,Cell,
> > Options, Top, Left,Right, Bottom) - very quick. However, through VBA code
> > this is only applicable to the Table (default for entire table) or Cell, not
> > column. The default table values does not help since a table which already
> > has cell margins set are not overridden by the table default properties.
> > The cell overrides the table properties.
> >
> Try selecting the column, then applying the property to the SELECTION.Cells
>
> That's the only way to quickly process an entire column or group of cells that
> aren't in a contiguous line (row).
>
> Cindy Meister
> INTER-Solutions, Switzerland
> http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
> http://www.word.mvps.org
>
> This reply is posted in the Newsgroup; please post any follow question or reply
> in the newsgroup and not by e-mail :-)
>
>
.



Relevant Pages

  • Re: Macro or drop down list ?
    ... Cindy, Many thanks for your prompt reply. ... You should see it references the sheetname!r1c1 cell. ... > (datasheet1info1, for example). ... > for datasheet for the four Link fields. ...
    (microsoft.public.word.newusers)
  • RE: keeping text in 1 column
    ... Cindy B ... I've tried text wrap - which works, but than the cell row expands - which I ... It doesn't seems logical to set the column to textwrap to keep it from ...
    (microsoft.public.excel.misc)
  • Multiple Records Same Page
    ... and looked at the info on Cindy ?'s ... website, and I'm still stumped. ... The right cell contains my merge fields, ... field contents that go with the field titles. ...
    (microsoft.public.word.mailmerge.fields)
  • RE: keeping text in 1 column
    ... I've tried text wrap - which works, but than the cell row expands - which I ... It doesn't seems logical to set the column to textwrap to keep it from ... Cindy B ...
    (microsoft.public.excel.misc)
  • Re: change date abbreviations in excell 2003
    ... You will not be able to produce a "real" date using those codes; rather, you will only be able to produce a text string that looks like a date. ... Rick (MVP - Excel) ... "Cindy at PWIC" wrote in message ... In cell A2 is today's date in julian code which is like this: ...
    (microsoft.public.excel.misc)