Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
use macro to select printer profile...
we have a profile set up in a network printer. are there anyway to select
this profile using VBA macro? thank you for any help. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
use macro to select printer profile...
I'm not sure what a printer profile is, but maybe you can just show the user the
screen to select the printer??? Application.Dialogs(xlDialogPrinterSetup).Show or Application.Dialogs(xlDialogPrint).Show BJ wrote: we have a profile set up in a network printer. are there anyway to select this profile using VBA macro? thank you for any help. -- Dave Peterson |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
use macro to select printer profile...
There is a profile has been assigned to this network printer. this profile
has setup sepcificly for an Excel report. by choosing this profile, user doesn't need to set up the property each time, for example, print on both side, legel paper...etc. we have finished the code that select this network printer as a default printer. the problem is how to select this profile from the printer through macro. user just wants to click on the 'Print' button from the macro then get the print out from the printer. no more click. "Dave Peterson" wrote: I'm not sure what a printer profile is, but maybe you can just show the user the screen to select the printer??? Application.Dialogs(xlDialogPrinterSetup).Show or Application.Dialogs(xlDialogPrint).Show BJ wrote: we have a profile set up in a network printer. are there anyway to select this profile using VBA macro? thank you for any help. -- Dave Peterson |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
use macro to select printer profile...
I think you'd have to know the name of the profile--and can't it change for each
user? This may help if that last portion NE01, NE02, ... may change: Option Explicit Sub testme() Dim iCtr As Long Dim FoundIt As Boolean Dim CurPrinter As String CurPrinter = Application.ActivePrinter FoundIt = False For iCtr = 0 To 99 On Error Resume Next Application.ActivePrinter = "\\EMAILPC\HP LaserJet 2100 Series PS on Ne" _ & Format(iCtr, "00") & ":" If Err.Number = 0 Then FoundIt = True Exit For Else 'keep looking Err.Clear End If Next iCtr On Error GoTo 0 If FoundIt = False Then MsgBox "No printer close to that name" Else 'do the real work 'and change it back Application.ActivePrinter = CurPrinter End If End Sub You'll have to provide the portion of the string that doesn't change. Ps. I'm still not sure what a printer profile is. So feel free to ignore this if it's not close to what you need. BJ wrote: There is a profile has been assigned to this network printer. this profile has setup sepcificly for an Excel report. by choosing this profile, user doesn't need to set up the property each time, for example, print on both side, legel paper...etc. we have finished the code that select this network printer as a default printer. the problem is how to select this profile from the printer through macro. user just wants to click on the 'Print' button from the macro then get the print out from the printer. no more click. "Dave Peterson" wrote: I'm not sure what a printer profile is, but maybe you can just show the user the screen to select the printer??? Application.Dialogs(xlDialogPrinterSetup).Show or Application.Dialogs(xlDialogPrint).Show BJ wrote: we have a profile set up in a network printer. are there anyway to select this profile using VBA macro? thank you for any help. -- Dave Peterson -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Help with writing a macro to select & ID a printer. | Excel Programming | |||
select printer macro | Excel Worksheet Functions | |||
User select printer in print macro | Excel Programming | |||
User select printer in print macro | Excel Programming | |||
create a pause in print macro to allow user to select printer | Excel Programming |