Solved

Unable to set the PaperSize property of the PageSetup class

Posted on 2004-10-01
4
2,111 Views
Last Modified: 2008-01-16
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
Comment
Question by:DanielAttard
  • 3
4 Comments
 
LVL 34

Expert Comment

by:flavo
ID: 12205674
Dan,

That looks like an excel constant to me...

Can you post all the code..

Dave
0
 
LVL 34

Expert Comment

by:flavo
ID: 12205683
try

.PaperSize = 1


1 = xlPaperLetter in Excel
0
 
LVL 34

Accepted Solution

by:
flavo earned 500 total points
ID: 12205765
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
 

Author Comment

by:DanielAttard
ID: 12205796
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

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Join & Write a Comment

It took me quite some time to sort out all the different properties of combo and list boxes available from Visual Basic at run-time. Not that the documentation is lacking: the help pages are quite thorough and well written. The problem was rather wh…
In the article entitled Working with Objects – Part 1 (http://www.experts-exchange.com/Microsoft/Development/MS_Access/A_4942-Working-with-Objects-Part-1.html), you learned the basics of working with objects, properties, methods, and events. In Work…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now