N
Nick T
Hi,
I have a form which has a cmd button on it. The current code behind my cmd
button is as below. When my button is clicked, a window pops up asking me
the format i want to send my attachment file - ie, HTML, Text File, Rich Text
Format etc.
Questions:
1) Can i write into the code that i want the file format to be eg. HTML
2) Can i write into the code somthing which automatically sends the e-mail,
as opposed to just opening my e-mail, inserting the e-mail address and
attaching the file?
3) Can i write into the code somthing like emailsubject = "test test test"
and emailbody "hello hello" ??
My current code is:
Private Sub Command35_Click()
On Error GoTo Err_Command35_Click
Dim stDocName As String
stDocName = "Report1"
DoCmd.SendObject acReport, stDocName, , " '" & Forms!Email1!Email & "'"
Exit_Command35_Click:
Exit Sub
Err_Command35_Click:
MsgBox Err.Description
Resume Exit_Command35_Click
End Sub
Any help or suggestions greatly appreciated.
Many thanks
I have a form which has a cmd button on it. The current code behind my cmd
button is as below. When my button is clicked, a window pops up asking me
the format i want to send my attachment file - ie, HTML, Text File, Rich Text
Format etc.
Questions:
1) Can i write into the code that i want the file format to be eg. HTML
2) Can i write into the code somthing which automatically sends the e-mail,
as opposed to just opening my e-mail, inserting the e-mail address and
attaching the file?
3) Can i write into the code somthing like emailsubject = "test test test"
and emailbody "hello hello" ??
My current code is:
Private Sub Command35_Click()
On Error GoTo Err_Command35_Click
Dim stDocName As String
stDocName = "Report1"
DoCmd.SendObject acReport, stDocName, , " '" & Forms!Email1!Email & "'"
Exit_Command35_Click:
Exit Sub
Err_Command35_Click:
MsgBox Err.Description
Resume Exit_Command35_Click
End Sub
Any help or suggestions greatly appreciated.
Many thanks