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.
Showing results for 
Search instead for 
Did you mean: 

Unable to launch a new document in winword 2007 from abap using OLE

0 Kudos

Dear Developers,

We have a customized abap report which use OLE to launch a new document and display SAP data in that document. It is working on winword 2003.

When we upgrade our version to office 2007 (winword 2007), the abap report will only launch a blank screen with no new document , no data is displayed.

After reading OSS note 1286768, I tried with sap gui version 7.10 patch 17, but it still did not work.

Some part of the codes below :

CREATE OBJECT wordobj 'Word.Basic' .

CALL METHOD OF wordobj 'AppInfo' = version EXPORTING #1 = 2.

CALL METHOD OF wordobj 'FileNew' EXPORTING #1 = ''.

CALL METHOD OF wordobj 'AppShow'.

Do we need to install any files in SAP server to enable winword 2007?

Do you have any tips to share?

Thanks & regards

Bee Khuan


Active Contributor
0 Kudos


use the following

create object wordobj 'WORD.APPLICATION' .

if sy-subrc ne 0 .

message s000(su) with 'Error while creating OLE object!'.

leave program .

endif .

set property of gs_word 'Visible' = '1' .

  • SET PROPERTY OF gs_word 'Save' = '1' .

get property of gs_word 'documents' = gs_documents.

call method of gs_documents 'Add' = newdoc.

Thanks & Regards,

Vallamuthu. M

0 Kudos


Thanks for your tips.

I solved my issue.

The reason is my prg is calling as a template, it is not available in office 2007.

So I change to normal.dotm and it worked.


Bee Khuan

0 Kudos


We are experiencing the same problems. However, in my scenario, not all workstations have MS Word 2007. Some workstations still have MS Word 2003. How can I check whether a workstation is using or normal.dotm?

Thanks in advance for your help.