[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Printer Definitions

Posted on 2011-09-19
5
Medium Priority
?
187 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 2000 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

Tech or Treat!

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

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…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

650 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