Results 1 to 4 of 4
  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 Type/Selection (WORD 97/2000)

    I have designed a template that allows users to have a mixture of portrait & landscape pages. The problem I have is that when I set

    ActiveDocument.PageSetup.PageSize = wdPaperA4

    the PageSetup.PageSize for the LANDSCAPE section changes to "Custom Size". No other options are effected. The page changes from landscape to portrait. I only have two options for the paper size (A4, Custom Size) for my printer. Any idea why this happens?

    Also, is there a way know the default "Paper Type/Size" for the printer? I know which printer is installed and can get a list of paper types/sizes it supports. I would like to know the default paper size (it would normally be A4 or Letter & very occasionally something different).

    Thanks in advance.
    Thanks.
    Robie

  2. #2
    Super Moderator
    Join Date
    Dec 2000
    Location
    New York, NY
    Posts
    2,970
    Thanks
    3
    Thanked 29 Times in 27 Posts

    Re: Page Type/Selection (WORD 97/2000)

    Robie,

    When I run this code, I get the same result. My default printer is set up for Letter sized paper, not A4, and I think that is what is causing the problem.
    (It would be interesting to confirm whether the problem does not arise if you run this same code on a computer that has the default printer set up for A4.)

    You can subsequently go to manually set the paper size for the landscape section to A4 - it will then change to landscape, but first you'll have to dismiss the dialog warning that some of the margins are outside the printable area - the results gotten when doing it via code is probably due to the same problem.

    Sorry I don't know how to return the default paper size for a given printer - but would like to know how - any API whizzes out there who can point out a way?

    Gary

  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: Page Type/Selection (WORD 97/2000)

    Gary,

    Exactly the same result. It doesn't matter which is the default printer. As soon as you set to something different (in may A4 or US Letter) it sets the page Custom Size.
    Thanks.
    Robie

  4. #4
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Page Type/Selection (WORD 97/2000)

    This could be due to the ambiguity of ActiveDocument.PageSetup in a document with multiple sections. Try something like this and see if the property is applied more appropriately:

    ActiveDocument.Sections(1).PageSetup.PaperSize = wdPaperA4

Posting Permissions

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