Print Page | Close Window

Removing Batch Printer

Printed From: www.exp-systems.com
Category: PDF reDirect
Forum Name: Programming
Forum Discription: VBA and Batch Tools to control PDF reDirect Pro
URL: http://www.exp-systems.com/Forum_exp/forum_posts.asp?TID=1186
Printed Date: 29 Mar 24 at 5:48AM


Topic: Removing Batch Printer
Posted By: DaveK
Subject: Removing Batch Printer
Date Posted: 17 Sep 14 at 2:00PM
After some time I was able to figure out how to print to pdf using a batch printer and the ActiveX.  Now, the batch printer is available to be selected as a printer.  I want to remove the batch printer and recreate it only as needed.  How can I do that?



Replies:
Posted By: Michel_K17
Date Posted: 17 Sep 14 at 9:45PM
Hi Dave,

Good question.

AS I recall, the ActiveX will create the batch printer automatically if one is not there, but I did not put any code to remove the printer after the fact. However, the removal of the printer is easily done via an VBA API call.

The API Function is "DeletePrinter". I found some sample code here which should get you going in the right direction:
http://binaryworld.net/main/CodeDetail.aspx?CodeId=3646

Cheers!

Michel



-------------
Michel Korwin-Szymanowski
EXP Systems LLC



Print Page | Close Window