This for an app being used in Access 2003. I'm trying to (sort of) automate naming a PDF report. After the user selects a printer from the print dialog, if the printer name is like "*PDF*" then I want to put the PDF file name in the clipboard so it can be quickly pasted in the file name of the PDF printer's save dialog.
Something like this:
The closest code that I can find is
but that returns the name of the default printer, not the selected printer.
Any help is appreciated!
Thanks,
Sup
Something like this:
Code:
Dim strSelectedPrinter as string
DoCmd.OpenReport "rpt1", acViewPreview
DoCmd.RunCommand acCmdPrint
strSelectedPrinter = [I]'determine selected printer name here[/I]
If strSelectedPrinter like "*PDF*" then
[I]'place report name in clipboard[/I]
End if
DoCmd.Close acReport, "rpt1"
The closest code that I can find is
Code:
Application.Printer.DeviceName
Any help is appreciated!
Thanks,
Sup