Solved

Change the Printer Paper Size

Posted on 2001-06-29
10
298 Views
Last Modified: 2008-02-01
I need to know how I can change the default printers paper size to legal.
0
Comment
Question by:CodeHead
10 Comments
 
LVL 11

Expert Comment

by:Otana
Comment Utility
try this:

Dim vPrinter As Printer
Dim vSize As PrinterObjectConstants

vSize = vbPRPSLegal
vPrinter.PaperSize = vSize
0
 
LVL 9

Expert Comment

by:Valliappan AN
Comment Utility
Also, hope you will need to have installed the latest Service Pack for VB.
0
 
LVL 1

Author Comment

by:CodeHead
Comment Utility
Otana,
I tried this then opened up my printer and it did not change the setting.  
0
 
LVL 22

Expert Comment

by:rspahitz
Comment Utility
The above comment would change the settings for the current VB session.

You can try applying directly to the current (default) printer:

Printer.PaperSize = vbPRPSLegal

I think this will change the Windows settings rather than the settings for the application.
0
 
LVL 1

Author Comment

by:CodeHead
Comment Utility
I tried to apply it directly to the printer and it did not work.  The component will be used through Access to change the printer settings so I am not sure if it would work.  I want to be able to change the setting and have the property box reflect the changes.
0
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 
LVL 9

Accepted Solution

by:
Valliappan AN earned 80 total points
Comment Utility
I think you should have atleast VB Service Pack 2 to do the default printer change with Printer object in VB. or, you could use the class, just given in the freevbcode link below. Look at the links:

http://support.microsoft.com/support/kb/articles/Q167/7/35.ASP
(FIX: Setting Printer to Item in the Printers Collection Fails)
http://www.freevbcode.com/ShowCode.Asp?ID=641
(this can be used to change default printer)

Refer this link, hope, you could do some modifications here to do your paper size changing:
http://support.microsoft.com/support/kb/articles/Q180/6/45.ASP
(FIX: Cannot Change Page Settings During Print Job)

Hope this helps.
0
 
LVL 17

Expert Comment

by:inthedark
Comment Utility
Add the following:

Printer.TrackDefault = True

Befor changing printer settings.

0
 
LVL 1

Expert Comment

by:Moondancer
Comment Utility
You have 18 open questions today, all of which need your attention.  ADMINISTRATION WILL BE CONTACTING YOU SHORTLY.  Moderators Computer101, Netminder, Mindphaser or I will return to finalize these as soon as possible if after 7 days no response by the Asker.  EXPERTS-->  please post closing recommendations before that time.

Below are your open questions as of today.  Questions which have been inactive for 21 days or longer are considered to be abandoned and for those, your options are:
1. Accept a Comment As Answer (use the button next to the Expert's name).
2. Close the question if the information was not useful to you, but may help others. You must tell the participants why you wish to do this, and allow for Expert response.  This choice will include a refund to you, and will move this question to our PAQ (Previously Asked Question) database.  If you found information outside this question thread, please add it.
3. Ask Community Support to help split points between participating experts, or just comment here with details and we'll respond with the process.
4. Delete the question (if it has no potential value for others).
   --> Post comments for expert of your intention to delete and why
   --> YOU CANNOT DELETE A QUESTION with comments; special handling by a Moderator is required.

For special handling needs, please post a zero point question in the link below and include the URL (question QID/link) that it regards with details.
http://www.experts-exchange.com/jsp/qList.jsp?ta=commspt
 
Please click this link for Help Desk, Guidelines/Member Agreement and the Question/Answer process.  http://www.experts-exchange.com/jsp/cmtyHelpDesk.jsp

Click you Member Profile to view your question history and please keep them updated. If you are a KnowledgePro user, use the Power Search option to find them.  

Questions which are LOCKED with a Proposed Answer but do not help you, should be rejected with comments added.  When you grade the question less than an A, please comment as to why.  This helps all involved, as well as others who may access this item in the future.  PLEASE DO NOT AWARD POINTS TO ME.

To view your open questions, please click the following link(s) and keep them all current with updates.
http://www.experts-exchange.com/questions/Q.12036479.html
http://www.experts-exchange.com/questions/Q.20009996.html
http://www.experts-exchange.com/questions/Q.20010855.html
http://www.experts-exchange.com/questions/Q.20069067.html
http://www.experts-exchange.com/questions/Q.20081532.html
http://www.experts-exchange.com/questions/Q.20090911.html
http://www.experts-exchange.com/questions/Q.20101218.html
http://www.experts-exchange.com/questions/Q.20107838.html
http://www.experts-exchange.com/questions/Q.20108744.html
http://www.experts-exchange.com/questions/Q.20113500.html
http://www.experts-exchange.com/questions/Q.20115787.html
http://www.experts-exchange.com/questions/Q.11486298.html
http://www.experts-exchange.com/questions/Q.20133500.html
http://www.experts-exchange.com/questions/Q.20142611.html
http://www.experts-exchange.com/questions/Q.20143201.html
http://www.experts-exchange.com/questions/Q.20145267.html
http://www.experts-exchange.com/questions/Q.20245016.html
http://www.experts-exchange.com/questions/Q.20296474.html



*****  E X P E R T S    P L E A S E  ******  Leave your closing recommendations.
If you are interested in the cleanup effort, please click this link
http://www.experts-exchange.com/jsp/qManageQuestion.jsp?ta=commspt&qid=20274643
------> POINTS FOR EXPERTS awaiting comments are listed in the links below
http://www.experts-exchange.com/commspt/Q.20277028.html (Part 1)
http://www.experts-exchange.com/jsp/qShow.jsp?ta=commspt&qid=20295853 (Part 2)
 
Moderators will finalize this question if in @7 days Asker has not responded.  This will be moved to the PAQ (Previously Asked Questions) at zero points, deleted or awarded.
 
Thanks everyone.
Moondancer
Moderator @ Experts Exchange
0
 
LVL 49

Expert Comment

by:DanRollins
Comment Utility
Hi CodeHead,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will suggest to:

    Accept valli_an's comment(s) as an answer.

CodeHead, if you think your question was not answered at all or if you need help, you can simply post a new comment here.  Community Support moderators will follow up.

EXPERTS: If you disagree with that recommendation, please post an explanatory comment.
==========
DanRollins -- EE database cleanup volunteer
0
 
LVL 1

Expert Comment

by:Computer101
Comment Utility
Comment from expert accepted as answer

Computer101
E-E Moderator
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
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…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

772 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

13 Experts available now in Live!

Get 1:1 Help Now