473,624 Members | 2,475 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Changing the default printer

Hi,

I have some code that prints out a word document

but i need to be able to send this document to a specific printer

so far i have imported system.drawing. printing

and have tried this

Dim prtdoc As New PrintDocument
prtdoc.PrinterS ettings.Printer Name = "my printer"

but this doesnt actually change the printer and im now completely stuck

any help with this is much appreciated

Thanks

Mike Fellows
Nov 21 '05 #1
2 1265
Hi,

http://www.windowsformsdatagridhelp....0-673c63efa8cc

Ken
-----------------
"Mike Fellows" <mi************ *@equityhouse.N OSPAM.co.uk> wrote in message
news:OJ******** ************@gi ganews.com...
Hi,

I have some code that prints out a word document

but i need to be able to send this document to a specific printer

so far i have imported system.drawing. printing

and have tried this

Dim prtdoc As New PrintDocument
prtdoc.PrinterS ettings.Printer Name = "my printer"

but this doesnt actually change the printer and im now completely stuck

any help with this is much appreciated

Thanks

Mike Fellows

Nov 21 '05 #2
Thanks

"Ken Tucker [MVP]" <vb***@bellsout h.net> wrote in message
news:Oa******** ******@TK2MSFTN GP12.phx.gbl...
Hi,

http://www.windowsformsdatagridhelp....0-673c63efa8cc

Ken
-----------------
"Mike Fellows" <mi************ *@equityhouse.N OSPAM.co.uk> wrote in message
news:OJ******** ************@gi ganews.com...
Hi,

I have some code that prints out a word document

but i need to be able to send this document to a specific printer

so far i have imported system.drawing. printing

and have tried this

Dim prtdoc As New PrintDocument
prtdoc.PrinterS ettings.Printer Name = "my printer"

but this doesnt actually change the printer and im now completely stuck

any help with this is much appreciated

Thanks

Mike Fellows

Nov 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2591
by: Jody Burgess | last post by:
Hi; I am writing my first python program and would like to know how to change stdout to refer to my default printer or any other printer on my network. The other question is, Is there an API set of classes that allow me to interact with network devices. In other words, if I have a path and filename inside of a string variable in python, how do I send the file to the printer?? Thanks in advance
16
48863
by: cyranoVR | last post by:
This is the approach I used to automate printing of Microsoft Access reports to PDF format i.e. unattended and without annoying "Save As..." dialogs, and - more importantly - without having to use a commercial program such as Adobe Acrobat and its associated API. The technique uses Ghostscript and Redirection Port Monitor - two free programs for creating PDF documents provided free by Russell Lang. The actual automation requires VBA...
6
10482
by: Ioannis Demetriades | last post by:
Hi, I need to change the printer's font to "control" -a printer font, and then send a sequence of characters to the printer. My problem is that I cannot change the printer's font. Can this be done without API calls? Thanks Ioannis
0
1862
by: Anthony Nystrom | last post by:
I am having trouble with changing printer settings before I raise either the pagesetup dialog or the print preview dialog... Changing the printer name is easy, but I am also trying to change the paper size.... This particular paper size is 30386 Video Top is specific to the printer driver itself... Any sample code as to how to both change the printer and paper size as well as oriention so that the user doesn't have to? This particular printer...
3
8531
by: Rick R | last post by:
We need to change the paper size for the default printer before printing a PDF file from within a VB.Net application. printDocument printerSettings is not appropriate as there is no document to print. Any help is greately appreciated.
2
11082
by: ExitusLSU | last post by:
Is there a way to change the DEFAULT printer settings for an installed printer? I want it to change the printer settings for a specified printer at the whole OS/Windows level, not just for the application. Specifically, I need to change the default papersize for the printer for about 150 remote users. I've tried changing the paper size for the printer using the PrintDocument class, but that doesn't seem to change the default paper size...
3
2125
by: Panos | last post by:
Hi all, I am trying to print a report in A4 paper, but my printer's default paper is different (Letter 8.5 x 11 inches). So when i print, a significant part of the paper remains blank, because of the different margins. Does anyone know how to programmatically change the printer's default paper? Almost all properties of the Printersettings Class on this matter are ReadOnly. Thank u Panos
0
943
by: Panos | last post by:
Hi all, I am still trying to print a report in A4 paper, but my printer's default paper is different (Letter 8.5 x 11 inches). So when i print, a significant part of the paper remains blank, because of the different margins. Does anyone know how to programmatically change the printer's default paper? When i set the DefaultPageSettings.PaperSize.PaperName to a value other than the default, i get an exception, which says that i have to set...
9
27986
spider1916
by: spider1916 | last post by:
I am using the common dialog control to allow my users to select any printer available to them. The code I am using keeps changing the selected printer to the default printer............I don't want that. I can't find anything with a propar salution to my problem. I JUST WANT TO PRINT A REPORT!!!!!!! No setting needs to be changed, ever. I only want to get the selected printer from the dialog and print to it. This seems to allow me...
8
19098
by: ncsthbell | last post by:
Is there a way to change my default printer using vb? I have some reports I want to print to a certain printer and some to a different one. I have a routine that loops through all of the reports to print them so I would like to be able to change the default printer, print the odd reports and then change it back to the default printer after. I am running Access 2000.
0
8179
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8685
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8631
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8341
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8490
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7174
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5570
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
1796
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1489
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.