05-05-2011 8:09 AM
Hi experts,
2 years ago, i wrote an ABAP program, which created outlook mails and sent them to a special mail address.
Last week in our company we upgraded from Windows XP to Windows 7. Furthermore we replaced Outlook 2003 with Outlook 2010.
Since then there is a problem with my E-Mail program. Does anyone have some information what the problem might be?
That's the slice of code, which should be interessting (methtext is 'DISPLAY'):
FORM f_sendmail USING value(gv_mail_toaddr)
value(gv_mail_ccaddr)
value(gv_mail_subject)
value(gv_mail_body)
value(methtext).
INCLUDE ole2incl.
DATA: lr_outlook TYPE ole2_object,
lr_mi TYPE ole2_object.
CREATE OBJECT lr_outlook 'Outlook.Application'.
CALL METHOD OF lr_outlook 'CreateItem' = lr_mi
EXPORTING #1 = 0.
SET PROPERTY OF lr_mi 'To' = gv_mail_toaddr.
SET PROPERTY OF lr_mi 'CC' = gv_mail_ccaddr.
SET PROPERTY OF lr_mi 'Subject' = gv_mail_subject.
SET PROPERTY OF lr_mi 'Body' = gv_mail_body.
CALL METHOD OF lr_mi methtext.
FREE OBJECT lr_outlook.
ENDFORM. "F_SENDMAIL
Thanks for your help!
Best regards,
Patrick
05-05-2011 9:52 AM
Hi,
Check if you can get any useful information regarding your issue from the SAP Note - "1570573 - Rich Client throws email error on Windows 7 with Outlook 2007 and Outlook 2010 ".
Regards,
Harish