Re: Table Questions

From: Ken Hutson (ken.hutson_at_goetting.com)
Date: 09/16/04


Date: Thu, 16 Sep 2004 16:55:01 -0500

Hi Stephanie,

I saw cell padding earlier but I'm hoping I can find how far the borders are
fom the document margins.
Keep a running total of column widths?

Thanks,
Ken Hutson
San Antonio, TX

"Stephanie Krieger" <MODD_2003NO@SPAMmsn> wrote in message
news:102901c49c36$b946f9e0$a301280a@phx.gbl...
> Hi, Ken,
>
> First -- you can use Selection.Information to determine
> if your insertion point is in a table (wdWithinTable is
> one of the available constants):
>
> If Selection.Information(wdWithinTable) = True Then ...
>
> To find the cell margins programmatically -- the
> properties (of either a specified item in the Tables or
> Cells collection objects) are called:
>
> TopPadding
> BottomPadding
> LeftPadding
> RightPadding
>
> i.e....
>
> Selection.Tables(1).TopPadding
>
> Will return the top margin value for all cells in the
> first table in your selection (note that the Tables
> collection object can be used with either the Selection
> or ActiveDocument objects).
>
> You can find the cell margins in the U.I. through Table,
> Table Properties -- click Options on the Table tab to see
> or change the settings for the whole table. Click Options
> on the Cell tab to see or set unique settings for only
> the active or selected cells.
>
> Hope that helps.
>
> Stephanie Krieger
> author of Microsoft Office Document Designer (from
> Microsoft Press)
> email: MODD_2003 at msn dot com
> blog: arouet.net
> >-----Original Message-----
> >Hi Group,
> >
> >I am looping through the paragraphs collection in my
> document. When I
> >encounter a paragraph that resides in a table;
> >
> >First of all, where do I look to determine if the
> paragraph is inside a
> >table?
> >
> >I am also interested in knowing how to find distances,
> especially from;
> >left margin to the cell left border.
> >right margin to the cell right border.
> >top margin to the cell top border.
> >bottom margin to the bottom cell border.
> >Where can I find these values?
> >
> >Thanks,
> >Ken Hutson
> >San Antonio, TX
> >
> >
> >.
> >



Relevant Pages

  • Re: looping macro to test for borders
    ... So I figured you were starting with a multicell selection. ... (Used means a cell with something (a value or a formula) ... If TopCell Is Nothing Then ... border that you like. ...
    (microsoft.public.excel.programming)
  • RE: border for if
    ... Drawing on my last example using SELECTION, I would code it as follows, ... For Each rCell In Selection ... This will display a message box with the cell address everytime a cell ... finds a cell with no bottom border. ...
    (microsoft.public.excel.programming)
  • Table Questions
    ... Will return the top margin value for all cells in the ... You can find the cell margins in the U.I. through Table, ... >encounter a paragraph that resides in a table; ... >right margin to the cell right border. ...
    (microsoft.public.word.vba.general)
  • Re: How to find the bottom of a table in VBA
    ... even from table to table (and cell to cell) within one report. ... But, since hundreds of these templates already exist, and contents ... Instead it tells me the right margin of the page. ... right justifying that line, it would automatically be positioned just to ...
    (microsoft.public.word.vba.general)
  • Re: Inserting a picture
    ... We do tend to forget about cell margins as long as we're ... Word MVP FAQ site: http://word.mvps.org ... scanned the picture as a jpg. ... margin. ...
    (microsoft.public.word.docmanagement)