Results 1 to 3 of 3
  1. #1
    kata_vijay is offline Novice
    Windows XP Access 2007
    Join Date
    May 2016
    Posts
    2

    Add multiple tables to send an attachment through out look

    Hi, for below code i need to add one more table query to attach two excel files in one attachment without exporting into file and take those files as attachment. when i click button i need two excel files should attach in an email

    for below query i have added only one query attachment I.e,. qryRouting_Changese i need to add one more example: qAgentRouting_Final into below query.. Please help

    DoCmd.SendObject acSendQuery, qryRouting_Changes, acFormatXLS, _
    To:="SDM", _
    CC:="DBascar;nyadav2;raariga;vkata", _
    Subject:="Account Routing changes", _


    MessageText:="Hi All" & vbCrLf & vbCrLf & _
    "Attached file for previous day Account Routing changes " & vbCrLf & vbCrLf & _
    "Thanks," & vbCrLf & "Vijay" & vbCrLf & "Sr.Analyst, IO - Global Reference Data " & vbCrLf & "Ext (8132483) " & vbCrLf & vbCrLf & _
    "This electronic communication, including all attachments, contains confidential information that is intended only for the person to which it is addressed. Any review, re-transmission, dissemination, disclosure or other use of this information, either in whole or in part, by persons or entities other than the intended recipient is strictly prohibited. If you received this communication in error, or are not the intended recipient, please do not open or view any attachments, read, act upon, discuss, print, disclose, copy, retain or redistribute any portion of this electronic communication. Please notify the sender immediately and delete all copies of the message and attachments from any computer or electronic storage device."

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,522
    either sent 3 emails , 1 attachment each
    DoCmd.SendObject acSendQuery, query

    or send 1 email w 3 attachments by exporting to a file.
    docmd.transferspreadsheet
    it don't cost nuthin to export a spreadsheet then attach it. https://www.accessforums.net/showthr...ght=send+email

    These are 2 different animals, you cant add your own method if they don't allow it.

  3. #3
    kata_vijay is offline Novice
    Windows XP Access 2007
    Join Date
    May 2016
    Posts
    2
    but iam facing a problem when i am export and attach the files, some times the export files are not able to replace the old file

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

Similar Threads

  1. Replies: 3
    Last Post: 10-13-2014, 05:48 PM
  2. Send email with Attachment
    By scoe in forum Programming
    Replies: 3
    Last Post: 09-23-2014, 03:02 AM
  3. How to send email without attachment
    By behnam in forum Programming
    Replies: 3
    Last Post: 07-30-2014, 08:24 AM
  4. Send email in Outlook with attachment
    By kelkan in forum Programming
    Replies: 1
    Last Post: 02-01-2013, 10:31 PM
  5. Send Email with Attachment VBA Code
    By kevins in forum Programming
    Replies: 2
    Last Post: 10-03-2012, 01:21 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