Hello-
I'm using the Lebans code to convert my report to pdf. http://www.lebans.com/reporttopdf.htm
It is working great, except that I was wondering if there was a way to change the default location where the pdf is saved. It is currently defaulting to save to my desktop and I'd prefer to save to a network drive.
I've pasted my code below. Do I need to add something? Is this even possible?
Private Sub printreport_Click()
Dim blret As Boolean
Dim stdocname As String
Dim Filter As String
Filter = "AutoID = forms!frmstwLSR!AutoID"
stdocname = "rptstwLSR"
DoCmd.OpenReport stdocname, acPreview, , Filter
blret = ConvertReportToPDF(stdocname, vbNullString, "x.pdf", True, True, 150, "", "", 0, 0, 0)
End Sub
I'm using the Lebans code to convert my report to pdf. http://www.lebans.com/reporttopdf.htm
It is working great, except that I was wondering if there was a way to change the default location where the pdf is saved. It is currently defaulting to save to my desktop and I'd prefer to save to a network drive.
I've pasted my code below. Do I need to add something? Is this even possible?
Private Sub printreport_Click()
Dim blret As Boolean
Dim stdocname As String
Dim Filter As String
Filter = "AutoID = forms!frmstwLSR!AutoID"
stdocname = "rptstwLSR"
DoCmd.OpenReport stdocname, acPreview, , Filter
blret = ConvertReportToPDF(stdocname, vbNullString, "x.pdf", True, True, 150, "", "", 0, 0, 0)
End Sub