outlook express (sending email in access) 
Author Message
 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



Thu, 10 Feb 2005 04:32:33 GMT  
 outlook express (sending email in access)
I figured it out:
"Invoice" the 2nd parameter is a report, so I changed the
1st parameter acSendQuery to acSendReport and worked great!
I think I'll take a break and watch some football.

Quote:
>-----Original Message-----
>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
>.



Thu, 10 Feb 2005 04:39:29 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Send email with and access Outlook Express inbox???

2. Pointers using Outlook/Outlook Express Rules - Sending back tailored emails

3. Send email to emailadresses with Outlook Express

4. Sending HTML -or- PLAIN TEXT Email via Outlook Express

5. Sending Email from Excel using Outlook Express

6. Send email with Outlook Express 5

7. Sending Email from Excel via Outlook Express

8. Q: Sending email via Outlook Express

9. how do i send email using outlook express

10. Sending Access data to Outlook Express

11. Error sending report via Access / Outlook Express

12. cannot connect outlook to email server, but can connect outlook express

 

 
Powered by phpBB® Forum Software