Change printer based on user

matttclark

Board Regular
Joined
Jan 13, 2011
Messages
100
Hello,

have a multi user Access 2003 DB that we are planning to run on citrix. have set up test manager reports to go to a pdf file using pdfcreator (sourceforge version). the issue is that the citirx admins will not let us map a specific drive back to each users local pc, BUT we can use unc's to point to shared network folders. mangers are at 3 locations, home, west and south and each has permission to a network drive that is lcoal to their location.

using pdf creator i created multiple printers and associated profiles with each printer. with this we have set up printers named pdfhome, pdfwest and pdfsouth. the primary difference is that each printer points to a UNC directory accessible to the managers at that location only, in additon all set default file naming.

how can i call the specific printer based on the user? Can use either network name or the access login name (UL security).

following is the code section i am using in printing

Code:
Dim prtDefault As Printer
Set prtDefault = Application.Printer
 
'want to change printer here based on user
Set Application.Printer = Application.Printers!PDFHome
 
DoCmd.OpenReport "Mgr Monthly", acViewNormal, "", "", acNormal
Set Application.Printer = prtDefault

thanks in advance!
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.

Forum statistics

Threads
1,224,521
Messages
6,179,275
Members
452,902
Latest member
Knuddeluff

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top