Solved

Printer Definitions

Posted on 2011-09-19
5
177 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
  • 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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

786 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