Declare Function WriteProfileString Lib "kernel32"
Alias "WriteProfileStringA" _
(ByVal lpszSection As String, ByVal lpszKeyName As
String, ByVal lpszString As String) As Long
Once that is done, you could use the following function to
set the file name:
Public Function WritePDFFileName(PDFFileName As String) As
Long
Dim x As Long, Y As Long
'ReturnedValue = vbNull
'DefaultValue = vbNull
Y = WriteProfileString("Acrobat PDFWriter", "PDFFileName",
PDFFileName)
Once the file name is set, you could use DoCmd.Openreport
to print it to the file.
>.
>