How do I save a file (using the OutPutTo command) without hardcoding a specific drive? I want the directory to be relative to the current directory.
Below is the code that I use. The error message, "Can't save the output to the file you've selected." is displalyed when the Outputto command is executed.
Private Sub Report_Page()
'Identify a variable to hold the report file name
Dim strReportName As String
'Establish the report file name
strReportName = "\\PM_Reports\" & Right(Reports!PM_Proj_Num!Text95, 5) & "." & "rtf"
'Save the report to a file
DoCmd.OutputTo acReport, "PM_Proj_Num", "RichTextFormat(*.rtf)", strReportName
'Close the report to contine processing the remaining Program Managers' reports
DoCmd.Close acReport, "PM_Proj_Num"
End Sub
-jackie