Error occurred while accessing component property method:sen

Posted by deivaa.dhayalan on 12-Sep-2011 03:52

Hello,

In our application i am using the below code for sending email for alert purpose.

/* Email Alert*/

DEFINE VAR vOfficeHandle  AS COM-HANDLE NO-UNDO.
DEFINE VAR vObjoutlookMsg AS COM-HANDLE NO-UNDO.

CREATE "Outlook.Application" vOfficeHandle.
vObjoutlookMsg = vOfficeHandle:CreateItem(0).
   
ASSIGN
   vObjoutlookMsg:To      = 'Your_Name@Your_Domain.com'
   vObjoutlookMsg:Subject = 'Test Mail for Outlook'
   vObjoutlookMsg:Body    = 'Hai BDC, This is Test Mail '.

  vObjoutlookMsg:SAVE().
  vObjoutlookMsg:Send().


RELEASE OBJECT vOfficeHandle.
RELEASE OBJECT vObjoutlookMsg.

/* Email Alert*/

Whenever I open MS Outlook, the above program is working fine. But When I close Outlook and execute the same program giving an Error.

"Error occurred while accessing component property method send. Operation aborted Error 0x80004004".

Please some one help me to solve this issue,

Thanks in Advance,

Deivanayaga Perumal D.

Error.jpg

All Replies

Posted by rohit.ramak on 12-Sep-2011 23:53
This thread is closed