G
Guest
Is there a way that I can set up my report export to export to a .pdf format?
I use Adobe Acrobat 6.0 Professional
Here is my current code that I use to export to .rtf:
Begin Code:
Private Sub cmdPrintPreview_Click()
Dim strReportName As String
Dim strCriteria As String
Dim strOutputName As String
Me.Dirty = False
If NewRecord Then
MsgBox "This record contains no data. Please select a record to
print or Save this record." _
, vbInformation, "Invalid Action"
Exit Sub
Else
strReportName = "rptcustomorders"
strCriteria = "[orderid]= " & Me![orderid]
DoCmd.OpenReport strReportName, acViewPreview, , strCriteria
If MsgBox("Do you want to save the report to disk?", vbYesNo +
vbQuestion, "Save Report") = vbYes Then
strOutputName = "D:\Karma Imports\Program & Custom Orders\Custom
Orders\" & (Me!ordnum) & " - " & Format(Date, "mm_dd_yyyy") & ".rtf"
If Me.PrintOrder = False Then
Me.PrintOrder = True
Me.SystemPrintDate = Date
End If
DoCmd.OutputTo acOutputReport, strReportName, acFormatRTF,
strOutputName, True
End If
End If
End Sub
End Code
Thanks in advance
Brook
I use Adobe Acrobat 6.0 Professional
Here is my current code that I use to export to .rtf:
Begin Code:
Private Sub cmdPrintPreview_Click()
Dim strReportName As String
Dim strCriteria As String
Dim strOutputName As String
Me.Dirty = False
If NewRecord Then
MsgBox "This record contains no data. Please select a record to
print or Save this record." _
, vbInformation, "Invalid Action"
Exit Sub
Else
strReportName = "rptcustomorders"
strCriteria = "[orderid]= " & Me![orderid]
DoCmd.OpenReport strReportName, acViewPreview, , strCriteria
If MsgBox("Do you want to save the report to disk?", vbYesNo +
vbQuestion, "Save Report") = vbYes Then
strOutputName = "D:\Karma Imports\Program & Custom Orders\Custom
Orders\" & (Me!ordnum) & " - " & Format(Date, "mm_dd_yyyy") & ".rtf"
If Me.PrintOrder = False Then
Me.PrintOrder = True
Me.SystemPrintDate = Date
End If
DoCmd.OutputTo acOutputReport, strReportName, acFormatRTF,
strOutputName, True
End If
End If
End Sub
End Code
Thanks in advance
Brook