Results 1 to 4 of 4
  1. #1
    jmclemore is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Feb 2011
    Location
    Amarillo, TX
    Posts
    2

    Missing object .from

    Hello,

    I'm trying to send an email from Access to Outlook and need to have it specify that it is coming from a certain email account, even if it is not. We are using MS Exchange 2003 if that make a difference and here's my code:

    If Me.Sent = False Then

    Dim objOutlook As Object
    Dim objMail As Outlook.MailItem
    Dim objEmail As String
    Dim objSub As String
    Dim objMsg As String



    Set objOutlook = CreateObject("Outlook.application")
    Set objMail = Outlook.CreateItem(olMailItem)

    objEmail = Me.Email
    objSub = "We've Missed You!"
    objMsg = Me.Message

    objMail.From = "My Company's Name"
    objMail.To = Me.Email
    objMail.subject = objSub
    objMail.Body = objMsg

    objMail.Send

    Set objOutlook = Nothing

    End If

    I'm getting the error on the "objmail.from" line - Runtime Error '638': Object doesn't support this property or method.

    Any help would be greatly appreciated.

    Joshua

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,530
    I think it's

    objMail.SentOnBehalfOfName = "Blah@company.com"
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    jmclemore is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Feb 2011
    Location
    Amarillo, TX
    Posts
    2
    Quote Originally Posted by pbaldy View Post
    I think it's

    objMail.SentOnBehalfOfName = "Blah@company.com"
    Correct, sir! That worked perfectly. Thanks so very much!

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,530
    Ah good, glad I remembered correctly. Welcome to the site by the way!
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

Please reply to this thread with any new information or opinions.

Similar Threads

  1. ok what am i missing here ?
    By baseborn in forum Forms
    Replies: 6
    Last Post: 12-21-2010, 01:46 PM
  2. Replies: 3
    Last Post: 11-02-2010, 10:14 AM
  3. Missing file
    By faceofevil in forum Access
    Replies: 2
    Last Post: 11-01-2010, 10:55 PM
  4. Replies: 1
    Last Post: 08-05-2010, 12:11 PM
  5. Missing object references after move to Win7
    By Gdm in forum Programming
    Replies: 3
    Last Post: 07-26-2010, 07:03 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums