Results 1 to 3 of 3
  1. #1
    MTSPEER is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2013
    Posts
    283

    DoCmd.SendObject acSendTable

    Hello,



    When I use this in my module I get an error saying The object type argument for this action or method is blank or invalid. I have to open the table and run the code for it to produce an email. Does anyone know the issue why?
    Last edited by MTSPEER; 10-12-2016 at 06:09 AM.

  2. #2
    ranman256's Avatar
    ranman256 is online now VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    what is your ENTIRE code?

    docmd.SendObject acSendTable ,"tblNames",acformatXLS,vTO, ,,vSubj,vMsg

  3. #3
    MTSPEER is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2013
    Posts
    283
    Dim olApp As Outlook.Application
    Dim olMail As Outlook.MailItem
    Dim strMessage As String
    Set olApp = New Outlook.Application
    Set olMail = olApp.CreateItem(olMailItem)

    strMessage = "Hello," & vbNewLine & vbNewLine & "Please see the attached spreadsheets." & vbNewLine & vbNewLine & "Thank You," & vbNewLine & vbNewLine

    DoCmd.SendObject acSendTable, “Manual”, acFormatXLS, "<xyz@gmail.com>", _
    "<xyz@gmail.com>", , "Hello" & Date, _
    strMessage, True


    Set olApp = Nothing
    Set olMail = Nothing

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

Similar Threads

  1. Replies: 1
    Last Post: 07-30-2015, 12:56 PM
  2. Replies: 15
    Last Post: 06-29-2015, 11:12 AM
  3. DoCmd.SendObject Question
    By HunterEngineeringCoop in forum Programming
    Replies: 3
    Last Post: 10-04-2010, 01:42 PM
  4. Email sent via DoCmd.SendObject
    By silverback in forum Programming
    Replies: 0
    Last Post: 10-29-2009, 06:26 AM
  5. DoCmd.SendObject Help
    By bgreer5050 in forum Programming
    Replies: 0
    Last Post: 01-12-2007, 06:27 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