title: Randomly occurring error (48, error loading DLL) when trying to send an email from access 2013 through outlook 2013
body: <p>I am currently working on an access 2013 database. On one of the forms I have a button that collects information, then puts it into an outlook 2013 email and sends it. the code itself works, but sometimes (i can't predict when) I get an error that reads <a href="https://i.stack.imgur.com/92wE2.png" rel="nofollow noreferrer">"run-time error '48', Error loading DLL"</a>. Once this happens i have to restart the computer in order to get the button working again.  I have only been working with VBA for a few weeks and have not had any luck finding out a way to fix this.</p>
  
  <p>-the computers this program (it is a split database) is on have both office 2010 and 2013 on them . i don't know if this is causing the issue, but i don't know enough about what happens when they are on the pc at the same time to rule it out.</p>
  
  <p>-this issue happens on both .accde and .accdb versions of the program</p>
  
  <p><a href="https://i.stack.imgur.com/DBNmI.png" rel="nofollow noreferrer">here is what the debugger shows when the error happens</a> </p>
  
  <pre><code>'below is the code for the button that sends the email
  Public Sub Command239_Click()
  
  Dim oApp As Outlook.Application
  Dim oMail As MailItem
  Dim db As Database
  
  'there is code a bunch of code between here that does not 
  'relate to sending the email
  
      'accessing outlook
  Set oApp = CreateObject("Outlook.application")
  Set oMail = oApp.CreateItem(olMailItem)      ' &lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt; this line is highlighted in yellow    &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;       
  
  'this is for the body of the email.
  'things in quotes are text
  '&amp; between variables text and newlines
  'type the variable to write its value
  'vbCrLF goes to the next line
  oMail.Body = "Incident Log: " &amp; clsORopen &amp; ", " &amp; Lgst &amp; ", " &amp; Tme &amp; vbCrLf &amp; Division &amp; ": " &amp; Location &amp; ", " &amp; secLocation &amp; vbCrLf &amp; "Circuit/Apparatus: " &amp; Circuit &amp; vbCrLf &amp; "Caused by: " &amp; cause &amp; ", " &amp; rtcause &amp; vbCrLf &amp; vbCrLf &amp; Disturbance &amp; vbCrLf &amp; vbCrLf &amp; "Person Notified: " &amp; Notified &amp; vbCrLf &amp; "Returned to Normal: " &amp; Returned &amp; vbCrLf &amp; "User: " &amp; getusername &amp; " Date: " &amp; Format(Now, "MMM,d,yyyy")
  
  'the subject
  oMail.Subject = Division &amp; " - " &amp; Tyype &amp; ", " &amp; Circuit
  
  'sending to these people
  oMail.To = emaillist
  oMail.Send
  Set oMail = Nothing
  Set oApp = Nothing
  </code></pre>