OberonPlace.com Forums  

Go Back   OberonPlace.com Forums > Corel User Forums > CorelDRAW > General

Thread Tools Search this Thread Display Modes
Old 25-01-2005, 14:18
Posts: n/a
Default Select different printers in VBA

Hey guys, I'm creating an application in Access to automatically get data from a public SQL server and, once it's processed, distribute it to 3 different printers and run a report in a 4th one.
There is no user intervention unless paper is out or so and selecting printer is going to be data driven.
So far I can't find a way to change the default printer (unless showing the print dialog which is stupid since there will be no user intervention), every property i've found is read-only. Any ideas???
In the mean time I'll keep looking, may be I'll catch the answer before browse back here.
Reply With Quote
Old 31-01-2005, 16:38
Posts: n/a

you may have to tap into the Windows API to do it. Also, VB has a built in printers collection that may be available in VBA - not sure though.

go here: http://www.mentalis.org/agnet/apiguide.shtml
Reply With Quote
Old 02-02-2005, 17:14
Posts: n/a
Default Found

Ok, here is the result of my research: the only way i've found to change printers 'on the fly' to output different documents was using the PrintSettings.Load <filename.prs> property. This allow to load a set of print settings saved before and (apparently) is the only way to change the output printer by program. What I did is to use the set of system printers from VB(A) and save the selection in the registry so i can build and save my own .prs file just from my property's window and load it later when running the application.
This is very sad that something so "simple" like set a printer for a given document to output has to be worked around using long way tricks.

Reply With Quote

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
delete vba project from cdr file hotairballoon CorelDRAW/Corel DESIGNER VBA 1 18-05-2005 09:08
CD 10, VBA not returning true outline width Webster CorelDRAW/Corel DESIGNER VBA 1 24-11-2004 17:09
VBA help needed - changing colours fremoikaner CorelDRAW/Corel DESIGNER VBA 1 18-11-2004 06:06
VBA Select Printer? Jon Lorber CorelDRAW/Corel DESIGNER VBA 1 12-12-2003 09:36
Detect if VBA is installed (an answer and a question) reanan CorelDRAW/Corel DESIGNER VBA 3 04-12-2002 14:35

All times are GMT -5. The time now is 07:49.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.
Copyright © 2011, Oberonplace.com