Results 1 to 5 of 5
  1. #1
    Gina Maylone is offline Always learning
    Windows 7 64bit Access 2013
    Join Date
    Jun 2013
    Location
    Afton, MN
    Posts
    544

    Email from Access no longer working

    Hello!



    I have a new problem, after years of my email function working properly, after upgrading to Office 365 2016, I can no longer send emails from any of my apps. Sample db attached. References are set to Microsoft Outlook 16.0 Object Library. Code is:

    Code:
    Dim olApp As Object
    Dim objMail As Object
    Set olApp = CreateObject("Outlook.Application") 'Create a new instance of Outlook
    'Create e-mail item
    'Set objMail = olApp.CreateItem(olMailItem)
    Set objMail = olApp.CreateItem(0)
    With objMail
    'Set body format to HTML
    '.BodyFormat = olFormatHTML
    .bodyformat = 2
    .To = Me.emailaddress
    
    .SentOnBehalfOfName = "chris@ABCmoving.com"
    
    .Subject = "Thank you for choosing ABC Moving"
    .HTMLBody = "Testing body of email function "
    
    .Save
    .send
    
    End With
    Error highlights here: "Set objMail = olApp.CreateItem(0)" Error message is: Run-time error 2147467259 (800004005) You don't have permission to create an entry in this folder. Right click the folder, bla bla bla.

    I've tried running Access as administrator, to no avail. Running Windows 10, Access 2016. (Office 365, 2016)

    Database6.zip

  2. #2
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,397
    if your outlook is also 365 then I think you need something slightly different

    I don't use 365 myself but found this link

    https://technet.microsoft.com/en-us/...xchg.150).aspx

    and see posts #3 and #4 in this one

    http://forums.devshed.com/visual-bas...il-963102.html


    also this link, but for cdo, but might be a workaround

    https://clicdatacoder.wordpress.com/...-applications/

  3. #3
    Gina Maylone is offline Always learning
    Windows 7 64bit Access 2013
    Join Date
    Jun 2013
    Location
    Afton, MN
    Posts
    544
    Quote Originally Posted by Ajax View Post
    if your outlook is also 365 then I think you need something slightly different

    I don't use 365 myself but found this link

    https://technet.microsoft.com/en-us/...xchg.150).aspx

    and see posts #3 and #4 in this one

    http://forums.devshed.com/visual-bas...il-963102.html


    also this link, but for cdo, but might be a workaround

    https://clicdatacoder.wordpress.com/...-applications/
    Thanks Ajax! I thought I had found everything I could on this problem! I am going to try these solutions and I'll post back. Have a great day!

  4. #4
    Gina Maylone is offline Always learning
    Windows 7 64bit Access 2013
    Join Date
    Jun 2013
    Location
    Afton, MN
    Posts
    544
    Got it figured out! Went into my Users (C:\Users\Topdesk\Documents) and shared my Outlook Files folder. BOOM!

  5. #5
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 8 Access 2013
    Join Date
    Aug 2013
    Posts
    7,862
    Interesting. In general, I do not use Office 365. However, I do have some accounts with Online Exchange. Online Exchange is a flavor of Office 365. In order to interact with the Online Exchange accounts I install desktop versions of Outlook. I use code similar to the OP. The difference being that I use early binding.

    I have not had any issues and my code always worked as I expected. I would set permissions using my web browser to log into Office Online. I did not do anything special to my client machine that I can recall.

    One thing I did notice is that you have included a delegate.
    .SentOnBehalfOfName = chris@ABCmoving.com

    IIRC, there is a permission setting for Delegates when you log into Exchange Online.

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

Similar Threads

  1. Replies: 3
    Last Post: 08-17-2016, 08:26 AM
  2. Replies: 4
    Last Post: 06-26-2015, 10:31 AM
  3. Query no longer working in Access 2013
    By aytee111 in forum Access
    Replies: 4
    Last Post: 09-11-2014, 06:48 PM
  4. Replies: 1
    Last Post: 05-21-2013, 01:28 PM
  5. Print button no longer working
    By kris335 in forum Programming
    Replies: 6
    Last Post: 09-28-2012, 08:56 PM

Tags for this Thread

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