I
Irshad Alam
To select a printer as I am using the Module of Mr. Albert D. Kallal - MVP.
The code I write is :
Private Sub Label3_Click()
SetDefaultPrinter ("DskPDF")
DoCmd.OpenReport "MeRepos", acViewNormal
SetDefaultPrinter ("Epson LQ-2180")
End Sub
The above code works fine, it selects the PDF writer and a dailog box
apprears to collect the file name & Drive and after giving the file name it
creates the pdf file of the report and set the default printer back.
Now my requirement is that I Want to avoid the dailog box which appears for
file name, I mean that When command button is pressed Form, It should create
the pdf at c:\ drive.
PDF Name should be : "MeRepo" & Date
Drive should be : C:\
Confirmation by Message box : "Your Pdf file is created at C:\"
There is an Ok button also to be clicked or Enter key also works after I
type the file name on the Dailog box which appears to collect the File Name.
Could any of the professional can advise me, what code should I add on the
above code , so that I avoid typing file name and close the dailog box.
Thanks .
The code I write is :
Private Sub Label3_Click()
SetDefaultPrinter ("DskPDF")
DoCmd.OpenReport "MeRepos", acViewNormal
SetDefaultPrinter ("Epson LQ-2180")
End Sub
The above code works fine, it selects the PDF writer and a dailog box
apprears to collect the file name & Drive and after giving the file name it
creates the pdf file of the report and set the default printer back.
Now my requirement is that I Want to avoid the dailog box which appears for
file name, I mean that When command button is pressed Form, It should create
the pdf at c:\ drive.
PDF Name should be : "MeRepo" & Date
Drive should be : C:\
Confirmation by Message box : "Your Pdf file is created at C:\"
There is an Ok button also to be clicked or Enter key also works after I
type the file name on the Dailog box which appears to collect the File Name.
Could any of the professional can advise me, what code should I add on the
above code , so that I avoid typing file name and close the dailog box.
Thanks .