Skip to Content
0

Check Running Applications on the client PC using ABAP

Feb 08 at 06:17 AM

42

avatar image

I am developing a program with OLE2OBJECT for processing the MS word file. But, The system sometimes process already opened word file instead of the desired file. So, I want to check in the beginning of my program, if MS word is already running or not. How can I check this.

Regards,

Dipeshkumar Bhavsar

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Raymond Giuseppi
Feb 08 at 07:04 AM
0

Usually solved with method get 'GetObject' on 'Word.Application' , if assign successfull (and '.Documents.count.' > 0) then Word is already running (with at least one opened document) else use 'CreateObject'. (But usually in some VBscript, CL_GUI_FRONTEND_SERVICES=>EXECUTE, etc.)


Show 3 Share
10 |10000 characters needed characters left characters exceeded

Hi Raymond,

Thanks for your answer. But, I am struggling to get the value back in SAP for Documents.Count. If you can help me how to get the value back in SAP.

Regards,

Dipeshkumar Bhavsar

0
Dipeshkumar Bhavsar

In vba, code would look like

    Dim wdApp As Object
    Set wdApp = GetObject(, "Word.Application")
    Debug.Print wdApp.Documents.Count
    Set wdApp = Nothing
0

I know the VBA Code. But, how to replicate the same in SAP? This GetObject is a function not the method or property. so, it is hard to call within the ABAP code.

0