Skip to Content
author's profile photo Former Member
Former Member

Problem: Create Outlook 2010 Mail with ABAP (Outlook 2003 worked)

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on May 05, 2011 at 08: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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.