Sending email through Outlook (1 Viewer)

JohnPapa

Registered User.
Local time
Today, 05:05
Joined
Aug 15, 2010
Messages
954
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: 72

Minty

AWF VIP
Local time
Today, 03:05
Joined
Jul 26, 2013
Messages
10,371
Check that both outlook and access are NOT running as/with admin privileges.
 

JohnPapa

Registered User.
Local time
Today, 05:05
Joined
Aug 15, 2010
Messages
954
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?
 

Minty

AWF VIP
Local time
Today, 03:05
Joined
Jul 26, 2013
Messages
10,371
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.
 

JohnPapa

Registered User.
Local time
Today, 05:05
Joined
Aug 15, 2010
Messages
954
Hi Minty,

Both checkboxes are not checked.

Does something else come to mind?
 

Minty

AWF VIP
Local time
Today, 03:05
Joined
Jul 26, 2013
Messages
10,371
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...
 

JohnPapa

Registered User.
Local time
Today, 05:05
Joined
Aug 15, 2010
Messages
954
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

Top Bottom