Results 1 to 4 of 4
  1. #1
    behnam is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    May 2014
    Posts
    72

    How to send email without attachment

    the following code sends an email, but automatically attaches a report. How can i modify it to remove the attachment.

    Code:
    DoCmd.SendObject acSendReport, , , _
        "MVSTAR OPERATOR; HYDRO ONE TxDx; TDS GENERATOR; HYDRO ONE BCC", "METER DATA SERVICES", , _
        "" & SubjectLine, "" & MessageLine, True
    i tried leaving the fields that specify the report and file type but that dosent change anything.

  2. #2
    ranman256's Avatar
    ranman256 is online now VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    sendObject sends the file (object) attached.
    How else do you wish to send the data?

  3. #3
    orange's Avatar
    orange is online now Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726

  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,521
    You can simply change acSendReport to acSendNoObject (I think that's the constant).
    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. Send email in Outlook with attachment
    By kelkan in forum Programming
    Replies: 1
    Last Post: 02-01-2013, 10:31 PM
  2. Send Email with Attachment VBA Code
    By kevins in forum Programming
    Replies: 2
    Last Post: 10-03-2012, 01:21 PM
  3. Replies: 1
    Last Post: 03-09-2011, 08:54 AM
  4. Send in Email Body vice Attachment
    By cassidym in forum Programming
    Replies: 2
    Last Post: 10-20-2010, 06:21 AM
  5. Beginner trying to send email with attachment
    By ahm in forum Programming
    Replies: 2
    Last Post: 03-24-2009, 08:51 PM

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