Application Development and Automation 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: 
Read only

Open document with DOI open_document

Former Member
0 Likes
682

Hello,

I have to open a local Word document from ABAP. I call the method open_document from document proxy however, it is opened a temporary copy instead of the orginal (my document is copied to temp directory with name "~sap<guid>" and this copy is opened). Is it possible the original document to open?

Best regards,

Boguslaw Rokosa

2 REPLIES 2
Read only

basarozgur_kahraman
Contributor
0 Likes
511

Hi Boguslaw,

Try Below code.

CALL METHOD cl_gui_frontend_services=>execute

     EXPORTING

       parameter              = 'c:\filename1.doc'

       application            = 'C:\Program Files\Microsoft Office\Office14\Winword.exe'

       synchronous            = 'X'

     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.

Best Regards

Basar Ozgur

Read only

0 Likes
511

Hi Basar,

thx for your answer. Unfortunately, I cannot use your solution. I open the document with DOI  because I have to use other functionality of it (I have to fill document data and save it without to use macros).

Best regards

Boguslaw Rokosa