dbTalk Databases Forums  

DoCmd.SendObject no longer works if Outlook 2003 is closed.

comp.databases.ms-access comp.databases.ms-access


Discuss DoCmd.SendObject no longer works if Outlook 2003 is closed. in the comp.databases.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Barry Edmund Wright
 
Posts: n/a

Default DoCmd.SendObject no longer works if Outlook 2003 is closed. - 12-08-2010 , 02:49 PM






Hi All,

I have been using the command below to open outlook 2003 (Version
11.8325.8329 SP3), attach a snapshot report, input the Mail address
and input a short message text into the email message.

DoCmd.SendObject acOutputReport, stDocName, acFormatSNP,
vTechSupportEmail, , , "Attached Bug Log Report", vMsgText

Now it will not open Outlook and gives Run-time error '2293'

However, if I open Outlook 2003 first it opens the email message.

Is anyone else experiencing this ?

Windows 7 64Bit
MS Access 2003

Cheers,
Barry

Reply With Quote
  #2  
Old   
Barry Edmund Wright
 
Posts: n/a

Default Re: DoCmd.SendObject no longer works if Outlook 2003 is closed. - 12-08-2010 , 05:57 PM






On Dec 8, 3:49*pm, Barry Edmund Wright
<barry.edmund.wri... (AT) witstoronto (DOT) ca> wrote:
Quote:
Hi All,

I have been using the command below to open outlook 2003 (Version
11.8325.8329 SP3), *attach a snapshot report, input the Mail address
and input a short message text into the email message.

DoCmd.SendObject acOutputReport, stDocName, acFormatSNP,
vTechSupportEmail, , , "Attached Bug Log Report", vMsgText

Now it will not open Outlook and gives Run-time error '2293'

However, if I open Outlook 2003 first it opens the email message.

Is anyone else experiencing this ?

Windows 7 64Bit
MS Access 2003

Cheers,
Barry
Hi All,

I resolved this issue.

I recently installed Avast 5 antivirus and the Avast Outlook plugin
would not let Outlook open.

There are two workarounds for this:
1) Disable the Avast plugin
Open Outlook and go to:
Tools/Options/Other Tab/Advanced Options button/Add-In Manager button/
uncheck Avast
2) Add the following code before the DoCmd.SendObject
'Find out if Outlook is running
If fIsAppRunning("outlook") = False Then
'If outlook is not running then start it.
Shell "outlook.exe", vbNormalNoFocus
End If

fIsAppRunning is an API module I found at the AccessWeb:
API: Find out if an application is currently running
http://www.mvps.org/access/api/api0007.htm

Note: You will need to add the following Case Line to the above module
– it didn’t have one for “Outlook”
Case "Outlook": strClassName = "rctrl_renwnd32"

Cheers,
Barry

Reply With Quote
  #3  
Old   
a a r o n . k e m p f @gmail.com [MCITP: DBA]
 
Posts: n/a

Default Re: DoCmd.SendObject no longer works if Outlook 2003 is closed. - 01-03-2011 , 06:12 AM



sending emails using Access is a joke. move to SQL Server Reporting Services subscriptions if you just want reliable reporting.

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.