?
Solved

Change Paper Size for System Printer

Posted on 2006-10-31
14
Medium Priority
?
871 Views
Last Modified: 2010-05-18
How do I modify the System Default Printer Settings (not the VB Printer.) to change to legal paper?

0
Comment
Question by:ruskker
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
  • 3
  • +1
14 Comments
 
LVL 5

Expert Comment

by:lunchbyte
ID: 17844570
0
 
LVL 5

Expert Comment

by:lunchbyte
ID: 17844631
0
 
LVL 5

Expert Comment

by:lunchbyte
ID: 17844643
OH, I messed up. I did not read your question carefully. You want to set the legal paper not the default printer. My bad. Ignore the two previous posts.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Author Comment

by:ruskker
ID: 17845234
Thanks anyway lunchbyte.

I'm still really in need of a solution on how to set the System default printer paper size (not the VB Printer object).

The program launches AcrobatReader and I want to force the printout to be 14" - otherwise, Adobe will adapt to the current paper size.
0
 
LVL 5

Expert Comment

by:lunchbyte
ID: 17845400
Long shot but try

Printer.PaperSize = vbPRPSLegal

then your code that you use to open the acrobat reader.

I am not sure if acrobat reader will override it and put it back to default setting but try it.
0
 

Author Comment

by:ruskker
ID: 17845668
We have tried this, but it only affects the printer within the VB process. Acrobat Reader starts as a new process and picks up the system default printer settings.
0
 
LVL 21

Expert Comment

by:oleggold
ID: 17849955
This should help
0
 
LVL 5

Expert Comment

by:lunchbyte
ID: 17849974
huh? What will help? oleggold
0
 
LVL 15

Expert Comment

by:JackOfPH
ID: 17855288
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colPrinters = objWMIService.ExecQuery _
    ("Select * From Win32_Printer where DeviceName = 'EPSON AL-C1900 Advanced' ")
For Each objPrinter in colPrinters
    objPrinter.PaperSize = "Legal"
    objPrinter.Put
Next
0
 
LVL 15

Expert Comment

by:JackOfPH
ID: 17855523
Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2")
Set colInstalledPrinters = objWMIService.ExecQuery ("Select * from Win32_Printer")

For Each objPrinter in colInstalledPrinters
      Wscript.Echo "Name: " & objPrinter.Name & " Location: " & objPrinter.Location
     
     'set the paper type
     objPrinter.CurrentPaperType = 22 ' Don't know the number for legal but this code cahnge to A4 size...
Next
0
 

Author Comment

by:ruskker
ID: 17862937
Hi JackOfPH

This is getting closer, but I get err 438 Object doesn't support this property or method on the

objprinter.CurrentPaperType = 8  '(I think it's 8 for legal)

Any suggestions??

Ps. On your first comment, I got err 438 also
0
 
LVL 15

Expert Comment

by:JackOfPH
ID: 17878493
try this example...
0
 
LVL 15

Accepted Solution

by:
JackOfPH earned 1500 total points
ID: 17878495
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

770 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