
outlook express (sending email in access)
I'm having trouble getting the following command to work
in my access program:
DoCmd.SendObject acSendQuery, "Invoice", acFormatRTF, _
strToWhom, , , "Order Invoice " &Me.Caption,_
"INVOICE", intSeeOutlook
Does it make a difference that I have MS Outlook Express,
instead of MS Outlook?
Thanks Craig
(see entire function below)
Sub Email_Invoice_Click()
' Prevent error screen if user cancels without sending
mail.
On Error Resume Next
Dim strToWhom As String
Dim strMsgBody As String
Dim intSeeOutlook As Integer
' Determine if user wants to preview message in
Outlook window.
intSeeOutlook = MsgBox("Preview e-mail message?", _
vbYesNo, "Northwind " & Me.Caption)
' If user wants to directly send item, get recipient's
address.
If intSeeOutlook = vbNo Then
strToWhom = InputBox("Enter recipient's e-mail
address.", _
"Northwind Product List")
intSeeOutlook = False
End If
' Send query in RTF format.
' Open Outlook window if intSeeOutlook is True.
' Provide Subject title bar and message text.
DoCmd.SendObject acSendQuery, "Invoice", acFormatRTF, _
strToWhom, , , "Order Invoice " &
Me.Caption, _
"INVOICE", intSeeOutlook
End Sub