Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

ole outlook not working in sap gui 7.30

former_member186143
Active Contributor
0 Kudos

in the new sap gui the integration with word en excel is working fine (which is checked in tcode OLE)

but with outlook the ole integration doesn't work anymore ?

I use the code below for testing which works fine with sap gui 7.20 patchlevel 7

anybody got a clue what changed in the gui family regaring ole integration ?

REPORT  ZTEMP_OUTLOOK.

INCLUDE : OLE2INCL.

DATA: OUT      TYPE  OLE2_OBJECT,
       OUTMAIL  TYPE  OLE2_OBJECT,
       DESTI    TYPE  OLE2_OBJECT,
       ATT      TYPE  OLE2_OBJECT,
       ATTS     TYPE  OLE2_OBJECT.

CREATE OBJECT OUT 'Outlook.Application'.

CALL METHOD OF OUT 'CREATEITEM' = OUTMAIL  EXPORTING #1 = 0.

SET PROPERTY OF OUTMAIL 'SUBJECT' = 'Subject of your email'.

SET PROPERTY OF OUTMAIL 'BODY' = 'Body of your email'.

CALL METHOD OF OUTMAIL 'RECIPIENTS' = DESTI.

CALL METHOD OF DESTI'ADD' EXPORTING #1 = 'xxx @ yyy.com'.

CALL METHOD OF OUTMAIL 'ATTACHMENTS' = ATTS.

CALL METHOD OF ATTS 'ADD' EXPORTING #1 = 'C:\TEMP\bijlage.pdf'.

CALL METHOD OF OUTMAIL 'DISPLAY'.

kind regards

arthur

7 REPLIES 7

former_member186143
Active Contributor
0 Kudos

oh and I get subrc = 2 after CALL METHOD OF OUTMAIL 'DISPLAY'.  but I can't find what subrc 2 means in this case.


manuel_horn3
Explorer
0 Kudos

Hi Arthur,

I am facing the same problem. Outlook.Application is not working. Excel.Application works fine.

Did you find any solution for this?

Regards

Manuel

0 Kudos

Hello,

Are you using outlook 2010?

Calendar Cynchronisation for Outlook does not work for Office 2010

Refer to the Gui installation guide page 53

0 Kudos

Hello,

thanks for your hint.

Yes I am using Outlook 2010. The strange thing is that word and excel work fine.

Regards

0 Kudos

Hello Arthur,
Microsoft Outlook is not supported with Office integration  - see note

http://service.sap.com/sap/support/notes/722513

Please also ensure that you are using only 32bit Office.

http://service.sap.com/sap/support/notes/1442028

Best Regards,

Jude

0 Kudos

Thanks for your support.

I used office 2010 64bit. I removed it and installed the 32bit-version. Now everything works fine. Even outlook integration.

Regards Manuel

former_member186143
Active Contributor
0 Kudos

I have solved the problem by calling outlook with parameters instead of using OLE

concatenate '/m "mailto:'  h_email
                 '?bcc=' ls_mailsettings-zzccemail
                 '&subject=' lv_mailtitel
                 '&body=' v_char
                 '"/a "'  gv_file '"' into lv_parameter.


cl_gui_frontend_services=>execute(
   EXPORTING
*    document               =
      application            = 'Outlook'
*     parameter              = '/m someone@gmail.com /a "H:\export.xls"'
      parameter              = lv_parameter
*    default_directory      =
*    maximized              =
*    minimized              =
*    synchronous            =
*    operation              = 'OPEN'
*  EXCEPTIONS
*    cntl_error             = 1
*    error_no_gui           = 2
*    bad_parameter          = 3
*    file_not_found         = 4
*    path_not_found         = 5
*    file_extension_unknown = 6
*    error_execute_failed   = 7
*    synchronous_failed     = 8
*    not_supported_by_gui   = 9
*    others                 = 10
        ).
IF sy-subrc <> 0.
* Implement suitable error handling here
ENDIF.