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

    Page Orientation (Word 97/2000)

    Again, defining a new template and the requirement is to switch between portrait & landscaped mode printing automatically setting up headers and footers for the user. The headers/footers are different for odd/even pages.

    Is it possible to define a template (& a macro to switch between portrait and landscape) that sets up properly defined headers/footers for the user? I do hope so otherwise ...
    Thanks.
    Robie

  2. #2
    Silver Lounger
    Join Date
    Mar 2001
    Location
    Springfield, Ohio, USA
    Posts
    2,136
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Page Orientation (Word 97/2000)

    Raj, here is hopefully what you need:<pre>Sub SwitchOrient()
    ' This macro switches orientation
    With ActiveDocument.PageSetup
    If .Orientation = wdOrientLandscape Then
    .Orientation = wdOrientPortrait
    Else
    .Orientation = wdOrientLandscape
    End If
    End With
    End Sub

    Sub OddEven()
    ' This macro setups odd/even headers
    ActiveDocument.PageSetup.OddAndEvenPagesHeaderFoot er = True
    With ActiveDocument.Sections(1)
    .Headers(wdHeaderFooterPrimary).Range.Text = "Odd Head"
    .Headers(wdHeaderFooterEvenPages).Range.Text = "Even Head"
    End With
    End Sub</pre>

    <font face="Comic Sans MS">Sam Barrett, CACI </font face=comic>
    <small>And the things that you have heard... commit these to faithful men who will be able to teach others also. 2 Timothy 2:2</small>

Posting Permissions

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