Sending email through Outlook

JohnPapa

Registered User.
Local time
Today, 23:17
Joined
Aug 15, 2010
Messages
1,120
I use the following to send a report as attachment

Code:
On Error GoTo cmdEmail_Err
  DoCmd.SendObject _   acSendReport, _
  "rptLog", _
  acFormatPDF, , , , , "", True

cmdEmail_Err:
    Select Case Err.Number
  Case 2501
   MsgBox "OK", vbInformation
  Case Else
   MsgBox "Error " & Err.Number & " " & Err.Description
 End Select

It works (goes to Case 2501) if Outlook is not open

If Outlook is open I get the error shown in attachment.

I repaired Outlook and all updates have been applied.

I posted same yesterday at Microsoft.

Thanks
 

Attachments

  • OutlookError.png
    OutlookError.png
    23.5 KB · Views: 120
Check that both outlook and access are NOT running as/with admin privileges.
 
Thanks Minty,

The specific Access 2013 session is running with the Runtime (on a pc with the A2013 application).

Regarding Outlook 2013 I simply click on the icon.

Do you know how to check for admin rights?
 
Right click and select properties and then compatibility tab.
There is a tick box for Run as administrator.

You need to do check this on the actual program .exe file not just the shortcut.
 
Hi Minty,

Both checkboxes are not checked.

Does something else come to mind?
 
I might be tempted to tick them on both, open the programs close them then untick them on both...
I had a similar issue here although that was with 2010 versions and it was a permissions issue that resolved it.
Obviously I could be barking up completely the wrong tree as we are dealing with MS products here...
 
Minty,

It appears that you were barking up the right tree ...

I checked both, opened both and unchecked both again. There was some difficulty in opening Outlook. In Task Manager there was an Outlook session which I deleted. It now works.

Thanks again.
John
 

Users who are viewing this thread

Back
Top Bottom