Solved

Printer Definitions

Posted on 2011-09-19
5
180 Views
Last Modified: 2012-05-12
I am designing a program where I want the user to be able to define their own printer definitions, so they will select a printer, have the option of launching the default properties dialog or specify their own values such as paper size orientation etc.

I then want to call a program such as word, run a mail merge and pass in a user defined printer definition, is this possible and does anyone have any resources available for it?
0
Comment
Question by:rocky050371
[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
  • 3
5 Comments
 
LVL 70

Accepted Solution

by:
Éric Moreau earned 500 total points
ID: 36559662
0
 

Author Comment

by:rocky050371
ID: 36559933
Thanks, I really need the ability to define printer definitions on top of this.
0
 
LVL 15

Expert Comment

by:x77
ID: 36560623
CodeProject: Changing printer settings using C#

http://www.codeproject.com/KB/dotnet/NET_Printer_Library.aspx

I do´n like this.
It Change the DeviceMode to a specific Printer.

Note that you can go to Printer Folder, Double-Click on any Printer an Change Default Properties for printer.
Also you can Call This Dialog for any Printer From you Vb code.
You Can do it executint RunDll:

      %windir%\system32\rundll32.exe Printui.dll,PrintUIEntry /o /n PrinterName

Or you can use methods Declared on  Printui.dll from your code.
0
 
LVL 15

Expert Comment

by:x77
ID: 36560873
Printui Doc

Note That you can:

   /Ss Store printer settings into a file
   /Sr Restore printer settings from a file
0
 
LVL 15

Expert Comment

by:x77
ID: 36560968
You can configure the Printer and then save the Printer settings to a file:

Store all printer settings into a file:
RUNDLL32 PRINTUI.DLL,PrintUIEntry /Ss /n "printer" /a "file.dat"

Then from Your Program you can restore it Executing:
RUNDLL32 PRINTUI.DLL,PrintUIEntry /Sr /n "printer" /a "file.dat"

Note that Printer is the Printer Name.

0

Featured Post

Is Your DevOps Pipeline Leaking?

Is your CI/CD pipeline a hodge-podge of randomly connected tools? You’ve likely got a tool to fix one problem & then a different tool to fix another, resulting in a cluster of tools with overlapping functionality. Learn how to optimize your pipeline with Gartner's recommendations

Question has a verified solution.

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

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

728 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