Results 1 to 4 of 4
  1. #1
    Jules3579 is offline Novice
    Windows XP Access 2013 64bit
    Join Date
    Apr 2016
    Posts
    3

    Angry Sendobject crashing Access Runtime 2013 when using Outlook 2016

    Dear All



    I would appreciate your assistance with the below please.

    I have an Access 2013 database that I have written and it works fine on all our PC's either via Access or via Runtime 2013 except for one. The one we are getting an error on is a new PC and is running Office 2016 (via Office 365) and Access Runtime 2013. All of our other PC's are older and running nothing newer than 2013. On the new PC the database functions as it should until the docmd.sendobject is called and then it crashes. I cannot even get it to the point where it generates the email.

    I have tried searching for an answer but cannot find anything that works as what I have found says that it should work with Runtime 2013. My Access skills are still quite basic so I don't know of any rookie errors that I may have unknowingly committed!

    Any ideas would be very gratefully received.

    If further information is required please let me know what I need to supply.

    Many thanks in advance.

    Jules

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,523
    You could try a workaround using this.
    Youd have to save the report to pdf first, then attach.

    Code:
    '-------
    'YOU MUST ADD THE OUTLOOK APP IN REFERENCES!!!   checkmark OUTLOOK OBJECT LIB in the vbE menu, Tools, References
    '-------
    Public Function Send1Email(ByVal pvTo, ByVal pvSubj, ByVal pvBody, Optional pvFile) As Boolean
    Dim oApp As Outlook.Application
    Dim oMail As Outlook.MailItem
    On Error GoTo ErrMail
    Set oApp = CreateObject("Outlook.Application")
    Set oMail = oApp.CreateItem(olMailItem)
    With oMail
        .To = pvTo
        .Subject = pvSubj
        .Body = pvBody
        .Attachments.Add pvFile, olByValue, 1
        
       .Send
    End With
    
    EmailO = True
    Endit:
    Set oMail = Nothing
    Set oApp = Nothing
    Exit Function
    ErrMail:
    MsgBox Err.Description, vbCritical, Err
    Resume Endit
    Resume
    End Function

  3. #3
    Jules3579 is offline Novice
    Windows XP Access 2013 64bit
    Join Date
    Apr 2016
    Posts
    3
    Thank you very much ranman256. I will give that a go. I have a couple of technical guys on site who should hopefully be able to assist with this. Thanks again.

  4. #4
    Jules3579 is offline Novice
    Windows XP Access 2013 64bit
    Join Date
    Apr 2016
    Posts
    3
    I have now managed to solve this issue. Thank you raman256 you put me on the right path

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

Similar Threads

  1. Access 2016 runtime?
    By Fred Lindsley in forum Access
    Replies: 6
    Last Post: 10-13-2015, 02:45 PM
  2. Replies: 4
    Last Post: 09-14-2015, 06:41 PM
  3. Access Runtime and Outlook
    By siggybaby_18 in forum Access
    Replies: 1
    Last Post: 01-13-2014, 09:40 AM
  4. Outlook 2013 + Access 2013 + HTML
    By Yann63 in forum Programming
    Replies: 2
    Last Post: 11-26-2013, 02:39 PM
  5. FYI. New 2013 Access Runtime
    By rzw0wr in forum Access
    Replies: 0
    Last Post: 06-29-2013, 02:00 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