|
-
Mar 25th, 2010, 12:18 AM
#2
New Member
Re: VBA, office, VBS or shell duplex printing
 Originally Posted by westconn1
as there is no provision to change duplex in vba or when using shell /shellexceute etc
here is a dll to return /set duplex property for the printer, it should always be returned to the original state after printing, i am posting the dll as users for vba can not compile the code
sample usage
vb Code:
Set pd = CreateObject("printerduplex.class1")
ret = pd.duplex("HP Color LaserJet 2605", 0) ' get current state, pass 0
success = pd.duplex("HP Color LaserJet 2605", 2) 'set to flip side, returns true or false
' 1 = single side, 3 = flip top
'printing here
success = pd.duplex("HP Color LaserJet 2605", ret) ' return to original state
i have updated the dll with an extra function, to return a list of all available printers, with the port ("ne01") needed for excel etc
printerlist = pd.listprinters
Hi
How to connect this dll to excel VBA? What are the arguments?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|