Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Word margin

Status
Not open for further replies.

ksom262523

Programmer
Joined
Aug 12, 2003
Messages
2
Location
US
Hi,
I tried different ways of setting margins. However, it always end up setting the whole document. I want to just set the margins for a specific table. Anyone know how that's done?
Thanks,
Ksom
 
Hi Ksom,

You can set the Margins for the document or for a Section of the document. A single page can only have one set of margins so if your table is the only thing on one (or more) pages you can insert section breaks before and after and set margins for the section.

If you just want the table positioned on a page, grab its anchor and put it where you want it (or do it via Table Properties > Table tab > Positioning).

Enjoy,
Tony
 
Thanks Tony. Let me try to clarify my question. I try to create a table with width that is larger than the page margin allows, using VBA.

I will look into the section idea.

Thanks,
Ksom
 
Hi Ksom,

I don't think you need to change the margins to do that. try something like this ..

Code:
With Selection.Tables(1)
    .Rows.HorizontalPosition = CentimetersToPoints(-2)
    .Rows.RelativeHorizontalPosition = wdRelativeHorizontalPositionMargin
    .PreferredWidthType = wdPreferredWidthPoints
    .PreferredWidth = CentimetersToPoints(19)
End With

Enjoy,
Tony
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top