[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2409
  • Last Modified:

Unable to set the PaperSize property of the PageSetup class

Can someone tell me why I am getting this error:

Unable to set the PaperSize property of the PageSetup class

on the following line:

.PaperSize = xlPaperLetter

Thanks.
0
DanielAttard
Asked:
DanielAttard
  • 3
1 Solution
 
flavoCommented:
Dan,

That looks like an excel constant to me...

Can you post all the code..

Dave
0
 
flavoCommented:
try

.PaperSize = 1


1 = xlPaperLetter in Excel
0
 
flavoCommented:
If you are using Access 2003, i found this which should help you mate

        .Copies = 1
        .Orientation = acPRORLandscape
        .Duplex = acPRDPVertical
        .PaperBin = acPRBNAuto
        .PaperSize = acPRPSLetter
        .PrintQuality = acPRPQMedium

acPRPSLetter = 1 so the last comment should have worked too

Dave
0
 
DanielAttardAuthor Commented:
Thanks Flavo.  I think my problem here relates to the fact that my default printer is not working.  I cannot see the properties of it because "the print spooler service" is not started.  once i change to a different, working default printer, it seems to work.
0

Featured Post

Free recovery tool for Microsoft Active Directory

Veeam Explorer for Microsoft Active Directory provides fast and reliable object-level recovery for Active Directory from a single-pass, agentless backup or storage snapshot — without the need to restore an entire virtual machine or use third-party tools.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now