Results 1 to 8 of 8
  1. #1
    adnancanada is offline Competent Performer
    Windows XP Access 2007
    Join Date
    May 2010
    Posts
    121

    DoCmd.SendObject Method (Access)

    I have created a button to send email to person. It attached my query in excel format it is working fine. No issue. But I want to send multiple file in one shot , it is possible .

    I have created a macro but there is not macro object can be sent.

    here I found msdn website

    acSendForm
    2
    Send a Form.
    acSendModule
    5
    Send a Module.
    acSendNoObject
    -1
    (Default) Don't send a database object.
    acSendQuery
    1
    Send a Query.


    acSendReport
    3
    Send a Report.
    acSendTable
    Send a Table.


    Is it possible to attached 3 different file in one shot ?

    Pls advise.






  2. #2
    aytee111 is offline Competent At Times
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    No, it is not possible using SendObject. See here for a solution, post #7, copy and paste the code and make the changes you need.
    https://access-programmers.co.uk/for...d.php?t=142745

  3. #3
    adnancanada is offline Competent Performer
    Windows XP Access 2007
    Join Date
    May 2010
    Posts
    121
    Quote Originally Posted by aytee111 View Post
    No, it is not possible using SendObject. See here for a solution, post #7, copy and paste the code and make the changes you need.
    https://access-programmers.co.uk/for...d.php?t=142745


    Thanks a lot. in the post he said you ou'll need the Microsoft Outlook X.0 Object Library reference added to your DB for this to work.

    I did not find microsoft outlook object in my reference I am using Access 2010.

  4. #4
    aytee111 is offline Competent At Times
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    The number (x) they are referring to depends on what version of Access you are running. Access 2010 uses 14, not sure what the number is for 2007. There will only be one Outlook Object Library, don't worry about the number, that is the one you must select.

    In the VBA Editor:

    Tools>References>Microsoft Outlook ?? Object Library

    To make sure it is pasted correctly, compile the code - Debug>Compile

  5. #5
    adnancanada is offline Competent Performer
    Windows XP Access 2007
    Join Date
    May 2010
    Posts
    121
    Quote Originally Posted by aytee111 View Post
    The number (x) they are referring to depends on what version of Access you are running. Access 2010 uses 14, not sure what the number is for 2007. There will only be one Outlook Object Library, don't worry about the number, that is the one you must select.

    In the VBA Editor:

    Tools>References>Microsoft Outlook ?? Object Library

    To make sure it is pasted correctly, compile the code - Debug>Compile
    Hello aytee111, I have checked 5 times in reference list but I did not find any outlook there. Do I need to install something ? do you have snap shot you could paste.

    I

  6. #6
    aytee111 is offline Competent At Times
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    You can follow the path and see if it exists. This is Access 2010.
    Attached Thumbnails Attached Thumbnails Untitled.png  

  7. #7
    adnancanada is offline Competent Performer
    Windows XP Access 2007
    Join Date
    May 2010
    Posts
    121
    Quote Originally Posted by aytee111 View Post
    You can follow the path and see if it exists. This is Access 2010.
    Thank you. I followed your path but not found. Looks like missing.. where should I get it ? I searched explorer I found this file at this path C:\Program Files\Microsoft Office\Office15\MSOUTL.OLB . Can I copy this file paste in the location you shown .

  8. #8
    aytee111 is offline Competent At Times
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    You said you are using Access 2010 but the folder Office15 applies to version 2013. Do you have multiple versions installed? Copy that file and see if it works.

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. Replies: 5
    Last Post: 09-05-2014, 12:06 PM
  4. Outlook error message using SendObject method
    By Juan23 in forum Programming
    Replies: 3
    Last Post: 07-10-2013, 12:03 PM
  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