How do I use a string for filepath in this code??
I'm using Lebans code for converting reports to pdf files. In the code you can specifiy the OutputFilename (the path and filename). See below code (top part is shown):
In above case, the filename and path is "c:\Testreport.pdf". However, can I use a string there, if I don't want to hard code the path/name???
i have the filepath and name in a tabel, and can get that into a string like thing:
But when I use it with above Public Function, it doesn't work.
Can someone advise how I use the string with filepath/name, in stead of hard coding same?
Thanks.
I'm using Lebans code for converting reports to pdf files. In the code you can specifiy the OutputFilename (the path and filename). See below code (top part is shown):
Code:
Public Function ConvertReportToPDF( _
Optional RptName As String = "rptDailyReport", _
Optional SnapshotName As String = "", _
Optional OutputPDFname As String = "c:\Testreport.pdf", _
Optional ShowSaveFileDialog As Boolean = False, _
Optional StartPDFViewer As Boolean = False, _
Optional CompressionLevel As Long = 0, _
Optional PasswordOpen As String = "", _
Optional PasswordOwner As String = "", _
Optional PasswordRestrictions As Long = 0, _
Optional PDFNoFontEmbedding As Long = 0, _
Optional PDFUnicodeFlags As Long = 0 _
) As Boolean
In above case, the filename and path is "c:\Testreport.pdf". However, can I use a string there, if I don't want to hard code the path/name???
i have the filepath and name in a tabel, and can get that into a string like thing:
Code:
Dim strTest As String
strTest = DLookup("FilePath", "tblEmail")
But when I use it with above Public Function, it doesn't work.
Can someone advise how I use the string with filepath/name, in stead of hard coding same?
Thanks.
Last edited: