Results 1 to 6 of 6
  1. #1
    4 Star Lounger
    Join Date
    Jan 2002
    Location
    London, Gtr London, England
    Posts
    416
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Table position on a page (WORD 97/2000)

    The company template requires all the 'normal' text to be indented by 1 inch on every page. I have set up the 'normal' style to indent from left by 1 inch and this works fine.

    Now, when I insert a table, it inserts itself at position zero, i.e. 1 inch to the left of 'normal' text. I need the table to be indented by 1 inch from the left when inserted so that it appears underneath the text preceding it. Can this be done by default?

    Any help very gratefully accepted. I am sure you guys know a way of doing this simply.

    - ALSO -

    Is it possible to change tab positions for a particular style on the fly and reset them back without too much effort? Perhaps I should post this separately.

    Thanks in advance.
    Thanks.
    Robie

  2. #2
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Table position on a page (WORD 97/2000)

    Hi Robie:
    Perhaps the easiest way to set tables is to start with a 2 column 2 row table, go to Table Properties (Cell height & width in Word 97), &
    1. First decrease the width of the last column by 1 inch.
    2. On the row tab, indent by 1 inch (both rows).
    3. Distribute columns equally.
    4. Save the table as an autotext entry.
    5. Repeat for 3, 4, 5, etc. column tables.

    I save tables as autotext with names like t2, t3, etc.. Then when I want a table, I just type the abbreviation & press F3. You can save any type of table, paragraph, & style format this way & I think it's faster than using the table button on the standard toolbar.

    To change tab positions for a style on the fly:
    1. Position the cursor in a paragraph of that style.
    2. Change the tab position either by clicking & dragging on the ruler, double clicking the bottom of the ruler, or going to Format/tabs...
    3. Click in the style box on the formatting toolbar & press enter. A dialog will come up asking you if you want to change the style to reflect the changes.
    4. Click the radio button that accepts this.

    Note: if you go to Format/Style/Modify & check the box that says "Automatically update", any changes to the style will automatically change the style throughout the document. Make sure that you intend that before ticking that box or you'll find your style changing unexpectedly.

    Cheers,

  3. #3
    4 Star Lounger
    Join Date
    Jan 2002
    Location
    London, Gtr London, England
    Posts
    416
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Table position on a page (WORD 97/2000)

    Thanks Phil.

    But as regards to the style changes on the fly, I did not make myself clear.

    What I would like to do is within a document template so that changes are done automatically when the page is resized. I have two different page settings for A4 and Letter and when I switch between the two the headers/footers are not correctly set, i.e. the information goes beyond the right edge. I would like to change the style settings within a macro and reset them if the page size changes from A4/Letter and vice-versa.
    Thanks.
    Robie

  4. #4
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Table position on a page (WORD 97/2000)

    <P ID="edit" class=small>(Edited by Phil Rabichow on 17-Sep-02 09:33. )</P>I'm not a VBA expert, so I can't tell you exactly how to do this with a macro. However, when you change margins, the problem has always been the tab stops, you your macro must examine the new margins & set the tab stops accordingly.

    In Word 2000, there is another workaround. Get rid of the tab stops in the header/footer of your template & put a 3 column table in the header/footer with no borders. Set the middle column to center justification. Go to Table/Properties & for table width, set it to 100% (rather than inches or centimeters). Each column should be 33.3%. They will then adjust automatically. Unfortunately, this option doesn't exist in Word 97.

    Edited to add
    One thing you could do in any version is to have two styles that are identical except for the tab stops. Then you could switch between them when you changed paper size. You could have a macro that searched for & replaced one style with another.

    Hope this helps.

  5. #5
    Super Moderator
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    3,852
    Thanks
    4
    Thanked 259 Times in 239 Posts

    Re: Table position on a page (WORD 97/2000)

    It is going to be more complicated than that if there is a possibility of landscape pages or section breaks as well as A4/Letter shifts.

    The following macro will do what you want for a single section document but you will need a much more detailed solution for multi-section documents.
    <pre>Sub temp2()
    Dim lngPageWidth As Long
    With ActiveDocument.Sections(1).PageSetup
    lngPageWidth = .PageWidth - .LeftMargin - .RightMargin - .Gutter
    End With
    With ActiveDocument.Styles("Header").ParagraphFormat.Ta bStops
    .ClearAll
    .Add Position:=lngPageWidth, Alignment:=wdAlignTabRight
    .Add Position:=lngPageWidth / 2, Alignment:=wdAlignTabCenter
    End With
    With ActiveDocument.Styles("Footer").ParagraphFormat.Ta bStops
    .ClearAll
    .Add Position:=lngPageWidth, Alignment:=wdAlignTabRight
    .Add Position:=lngPageWidth / 2, Alignment:=wdAlignTabCenter
    End With
    End Sub</pre>

    Andrew Lockton, Chrysalis Design, Melbourne Australia

  6. #6
    4 Star Lounger
    Join Date
    Jan 2002
    Location
    London, Gtr London, England
    Posts
    416
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Table position on a page (WORD 97/2000)

    Phil & Andrew,

    What can I say except a a very BIIIIIIIIIIIIIG thank you. You guys are just great. You have given me few options for which I am extremely grateful.

    Once again thanks.

    Robie.
    Thanks.
    Robie

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •