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

OLE2 Automation

Former Member
0 Likes
497

Hi friends. I'm trying to understand OLE2 automation. I have the following sample code:

CREATE OBJECT gs_word 'WORD.Application' .
  IF sy-subrc NE 0 .
    MESSAGE s000(su) WITH 'Erro ao criar objeto OLE!'.
    LEAVE PROGRAM .
  ENDIF.
* Torna Objeto visivel
  SET PROPERTY OF gs_word 'Visible' = '1' .
* Abre novo Documento
  GET PROPERTY OF gs_word 'Documents' = gs_documents .
  CALL METHOD OF gs_documents 'Add' .
* Busca manipulador  do documento ativo
  GET PROPERTY OF gs_word 'ActiveDocument' = gs_actdoc .

I want t know how I can seethe class relate to "Word.appliction" and his propertys and methods avaliable.

Thanks a lot for any help.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
446

Hi,

try TCODE: DWDM.

Regards, Dieter

Hi friends. I'm trying to understand OLE2 automation. I have the following sample code:

CREATE OBJECT gs_word 'WORD.Application' .
  IF sy-subrc NE 0 .
    MESSAGE s000(su) WITH 'Erro ao criar objeto OLE!'.
    LEAVE PROGRAM .
  ENDIF.
* Torna Objeto visivel
  SET PROPERTY OF gs_word 'Visible' = '1' .
* Abre novo Documento
  GET PROPERTY OF gs_word 'Documents' = gs_documents .
  CALL METHOD OF gs_documents 'Add' .
* Busca manipulador  do documento ativo
  GET PROPERTY OF gs_word 'ActiveDocument' = gs_actdoc .

I want t know how I can seethe class relate to "Word.appliction" and his propertys and methods avaliable.

Thanks a lot for any help.

2 REPLIES 2
Read only

Former Member
0 Likes
447

Hi,

try TCODE: DWDM.

Regards, Dieter

Read only

Former Member
0 Likes
446

Thanks for answer.

I'm looking for where I can see the composition, but apears that this (methods) came from MS...

For example, I want to create a table in Word with 1 line, but this line more larger...I have the method, but I don't know how I can enlarge the line...

CALL METHOD OF p_gs_tables 'Add' = p_gs_table
    EXPORTING
      #1 = p_gs_range "Handle for range entity
      #2 = p_linhas   "Number of rows
      #3 = p_colunas. "Number of columns

Edited by: Fulvio Valente on Apr 24, 2009 2:55 PM