Types: OLE2_OBJECT LIKE OBJ_RECORD.
DATA : go_word TYPE ole2_object,
ud_filename(200) VALUE 'C:\documento.doc'.
CREATE OBJECT go_word 'Word.Basic'.
CHECK sy-subrc = 0.
CALL METHOD OF go_word 'FileOpen' EXPORTING #1 = ud_filename.
CHECK sy-subrc = 0.
CALL METHOD OF go_word 'FilePRINT'.
CHECK sy-subrc = 0.
CALL METHOD OF go_word 'DocClose'.
|