Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Software > Access Modules daovba ado > E-Mail Re****t ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 1 Topic 1532 of 1609
Post > Topic >>

E-Mail Re****t in Access

by =?Utf-8?B?dHJpYWQ=?= <triad@[EMAIL PROTECTED] > Aug 4, 2008 at 02:56 PM

I need to write a procedure to e-mail an open re****t thru Access.  I have
the 
following code that works except for the attachment.  I need to find a way
to 
attach the open re****t instead of the file "E:\Access\Accounts.rtf."

Function ap_CreateOLEMailItem()

    Dim objMailItem As Outlook.MailItem
    Dim myattachments As Outlook.Attachments
    Set olkApp = New Outlook.Application
    Set olkNameSpace = olkApp.GetNamespace("MAPI")
    Set objMailItem = olkApp.CreateItem(olMailItem)
    Set myattachments = objMailItem.Attachments

    myattachments.Add "E:\access\accounts.rtf", olByValue, 1, "Test"
  
   With objMailItem
        .Display
    End With
    Set objMailItem = Nothing
    Set olkNameSpace = Nothing
    Set olkApp = Nothing

End Function

I could use the following function but it opens a different version of the

e-mail send program that I don't want to use:

Function ap_CreateOLEMailItem()
DoCmd.SendObject acSendRe****t, , acFormatRTF, , , , "Purchase Order", 
"Please process and confirm this order.  Thanks."
End Function

Any suggestions would be appreciated.
 




 1 Posts in Topic:
E-Mail Report in Access
=?Utf-8?B?dHJpYWQ=?= <  2008-08-04 14:56:08 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Thu Nov 20 1:44:50 CST 2008.