Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / December 2004

Tip: Looking for answers? Try searching our database.

Centering Table in Frame

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mike - 02 Dec 2004 21:02 GMT
I have a macro that inserts a selected table and its
caption in a frame and places it either at the top or
bottom of the page. The table, created through a
predefined table style, is centered. However when the
table is placed in the frame, it is flushed left although
the table properties shows that centered is still
selected. (The frame stretches the length of the margin.)
The caption is still centered. Manually selected center
from the table properties does nothing either. How can I
center the table within the frame?

Thanks for any help
Word Heretic - 05 Dec 2004 01:06 GMT
G'day "Mike" <anonymous@discussions.microsoft.com>,

Might be easier to use the headers and footers areas for the insert.

Steve Hudson - Word Heretic

steve from wordheretic.com (Email replies require payment)
Without prejudice

Mike reckoned:

>I have a macro that inserts a selected table and its
>caption in a frame and places it either at the top or
[quoted text clipped - 8 lines]
>
>Thanks for any help
- 06 Dec 2004 15:23 GMT
This is not possible as there are already items in the
header/footer, and since the margins are carefully set.
Can a table not be centered in a frame like other
paragraph styles?

>-----Original Message-----
>G'day "Mike" <anonymous@discussions.microsoft.com>,
[quoted text clipped - 22 lines]
>
>.
Word Heretic - 07 Dec 2004 08:50 GMT
G'day <anonymous@discussions.microsoft.com>,

No, you set the left indent of the frame to make the table APPEAR
centered. You can select a row and use selection.information(WOW!) to
calc the width, add the pt width of the borders, add a pt for the
table layout itself. Subtract that from page width, divide by two,
thats your frame indent.

Steve Hudson - Word Heretic

steve from wordheretic.com (Email replies require payment)
Without prejudice

<anonymous@discussions.microsoft.com> reckoned:

>This is not possible as there are already items in the
>header/footer, and since the margins are carefully set.
[quoted text clipped - 32 lines]
>>
>>.
- 07 Dec 2004 16:12 GMT
I see. I have two problems however.

First, even though the widthrule property of the frame is
set to wdFrameAuto, the frame stretches the length of the
margin rather than the lenth of the table (I'm not sure
why).

Second, I can generally see how you can calculate the
width of the of the table using either
wdHorizontalPositionRelativeToPage or
wdHorizontalPositionRelativeToTextBoundary, but actually
doing it, and using it to set the left indent, is a
little beyond my capability.

The first problem I think is not important because
instead of setting the left boundary of the frame to the
page I can set the left boundary of the table in the
frame.

Yet that still leaves me with the second problem.
.
>-----Original Message-----
>G'day <anonymous@discussions.microsoft.com>,
[quoted text clipped - 50 lines]
>
>.
Word Heretic - 09 Dec 2004 11:11 GMT
G'day <anonymous@discussions.microsoft.com>,

Do it by hand then.

Steve Hudson - Word Heretic

steve from wordheretic.com (Email replies require payment)
Without prejudice

<anonymous@discussions.microsoft.com> reckoned:

>I see. I have two problems however.
>
[quoted text clipped - 79 lines]
>>
>>.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.