Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
bj bj is offline
external usenet poster
 
Posts: 1,397
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default 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   Report Post  
Posted to microsoft.public.excel.programming
bj bj is offline
external usenet poster
 
Posts: 1,397
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with writing a macro to select & ID a printer. Rene'48 Excel Programming 1 January 27th 09 12:24 AM
select printer macro jatman Excel Worksheet Functions 1 March 15th 08 01:58 PM
User select printer in print macro sarah_tennessee Excel Programming 0 April 7th 06 07:56 PM
User select printer in print macro rocket0612[_11_] Excel Programming 5 April 7th 06 07:49 AM
create a pause in print macro to allow user to select printer Scott53 Excel Programming 1 September 7th 05 04:29 PM


All times are GMT +1. The time now is 01:31 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"