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: 

example of CL_WORD_SAPSCRIPT_EDITOR or other possible word integration ...

former_member186143
Active Contributor
0 Kudos

without OLE integration.

I try to find a working example for CL_WORD_SAPSCRIPT_EDITOR

but I can't find it anywhere on sdn or the rest of cyberspace or in where used in SAP

anybody can help me out with an example ?

or perhaps to explain the problem. we try to connect to ms word without OLE.

so start up a .dot file and run a macro.

in the start up with command line parameters it doesn't work

in the run command I can put , but the macro isn't running automaticaly (yes all security is off)

winword.exe /tC:\temp\sapbrief.dot /mFilePrint /q

and if I translate into abap

CALL METHOD cl_gui_frontend_services=>execute
  EXPORTING
*     document               =
     application            = 'winword'
     parameter              = '/tP:\temp\sapbrief.dot /mFilePrint /q'
*    default_directory      =
*    maximized              =
*    minimized              =
*    synchronous            =
     operation              = ''
  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.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.

the /q is recognized but the /m not

anybody can help me out ?

kind regards

arthur de smidt

Edited by: A. de Smidt on Jul 14, 2009 3:53 PM

4 REPLIES 4

Kanagaraja_L
Active Contributor
0 Kudos

Check the Following Program for Working Example

LSTXBF07

LSTXBF09

LSTXBI06

Kanagaraja L

0 Kudos

ah I see that these includes go back to the smartform programm. but I can't see how I can test this ?

I have copied some of the coding into a test programm but somehow word doesn't start up

I try to find the connection to word in smartforms at the texteditor but I can't find it ?

is it also a customizing setting to activate this for smartforms ?

kind regards

arthur

0 Kudos

Hi,

About the smartforms and Word

Use TCODE I18N

Under the node I18N Customizing

Choose MS word as editor

Regards

0 Kudos

ah I see, know I get into debugging when I open smartform text field.

I try to make a sample progamm out of this which works on its own. but it seems that I can only use this class within text screens and not call word independent from a text edit screen ??

kind regards

arthur