M
MaryN
Guest
I am driving myself around a bend with this one. I currently have a button that the user presses and it attaches a filtered report (rtf) and places the email address in the "To" field. These reports now contain too much information to use the RTF format. I've pasted the code at the bottom of this text. I do not believe that snapshot is a viable option (correct me if I'm wrong) because regular individuals don't have the snapshot viewers dowloaded.
Is there anyway that I can set this up to create the PDF and attach it the same way in Outlook? We have distiller and Acrobat. All of the code I have found deals with Access 97 and "ini" files, which I am told by our systems department, are old windows files. I think I've check all Access and PDF developers sites!
Thank you!
Mary
Private Sub cmdSendConfirmation_Click()
Dim strDocName As String
Dim strWhere As String
strDocName = "rptEmail"
strWhere = "[OrgPeopleID]=" & Me!OrgPeopleID
If IsNull(Me![cboConfirmBy]) Then
DisplayMessage "You have not entered how to confirm the witness"
DoCmd.GoToControl "cboConfirmBy"
ElseIf (Me![cboConfirmBy] = "E-mail") And IsNull(Me![txtEmailAdd]) Then
DisplayMessage "When entered this contact you did not enter an email address!" _
& Chr(13) & "" _
& Chr(13) & "Please choose another option to confirm by" _
& Chr(13) & "" _
& Chr(13) & "Alternatively, close this from, return to the contact form" _
& Chr(13) & "and enter an email address, then return to confirm the witness"
ElseIf (Me![cboConfirmBy]) = "E-mail" Then
DoCmd.RunCommand acCmdRefresh
DoCmd.SendObject acSendReport, "rptEmail", , _
Forms!frmMeetingWitness!WitnessDetails!txtEmailAdd, , , "Confirmation", _
"Attached is your confirmation"
ElseIf (Me![cboConfirmBy]) = "Fax" Then
DoCmd.OpenReport strDocName, acViewPreview, , strWhere
ElseIf (Me![cboConfirmBy]) = "Mail" Then
DoCmd.OpenReport strDocName, acViewPreview, , strWhere
End If
End Sub
Is there anyway that I can set this up to create the PDF and attach it the same way in Outlook? We have distiller and Acrobat. All of the code I have found deals with Access 97 and "ini" files, which I am told by our systems department, are old windows files. I think I've check all Access and PDF developers sites!
Thank you!
Mary
Private Sub cmdSendConfirmation_Click()
Dim strDocName As String
Dim strWhere As String
strDocName = "rptEmail"
strWhere = "[OrgPeopleID]=" & Me!OrgPeopleID
If IsNull(Me![cboConfirmBy]) Then
DisplayMessage "You have not entered how to confirm the witness"
DoCmd.GoToControl "cboConfirmBy"
ElseIf (Me![cboConfirmBy] = "E-mail") And IsNull(Me![txtEmailAdd]) Then
DisplayMessage "When entered this contact you did not enter an email address!" _
& Chr(13) & "" _
& Chr(13) & "Please choose another option to confirm by" _
& Chr(13) & "" _
& Chr(13) & "Alternatively, close this from, return to the contact form" _
& Chr(13) & "and enter an email address, then return to confirm the witness"
ElseIf (Me![cboConfirmBy]) = "E-mail" Then
DoCmd.RunCommand acCmdRefresh
DoCmd.SendObject acSendReport, "rptEmail", , _
Forms!frmMeetingWitness!WitnessDetails!txtEmailAdd, , , "Confirmation", _
"Attached is your confirmation"
ElseIf (Me![cboConfirmBy]) = "Fax" Then
DoCmd.OpenReport strDocName, acViewPreview, , strWhere
ElseIf (Me![cboConfirmBy]) = "Mail" Then
DoCmd.OpenReport strDocName, acViewPreview, , strWhere
End If
End Sub