Sendmail from Access2007 (1 Viewer)

pookie62

Registered User.
Local time
Tomorrow, 00:52
Joined
Jan 16, 2005
Messages
47
Hi,
In MSAccess2003 this worked fine, in 2007 it doesn't.. why not ?
Code:
Code:
Private Sub Exportmail_Click()

Dim objOutlook As Object
Dim objOutlookMsg As Object
Dim objOutlookRecip As Object
Dim objOutlookAttach As Object
Dim AttachmentPath
Dim DisplayMsg

          ' Create the Outlook session.
          Set objOutlook = CreateObject("Outlook.Application")

          ' Create the message.
          Set objOutlookMsg = objOutlook.CreateItem(olMailItem)

          With objOutlookMsg
              ' Add the To recipient(s) to the message.
This is error line>> Set objOutlookRecip = .Recipients.Add("one@site.nl")
              objOutlookRecip.Type = olTo
 

Users who are viewing this thread

Top Bottom