Dear all,
I have a program which creates word documents from a template previously located in my desktop.
I use OLE Abap Objects, but I have a problem when I want to generate more than one page.
First page has the correct header, footer and text, but the other pages just have the text. Header and Footer dissapear....
I have to set as pages as suppliers I have. So my code is the following:
create object zword 'WORD.BASIC'.
call method of zword 'APPSHOW'.
call method of zword 'FILEOPEN'
exporting
#1 = path.
call method of zword 'EDITSELECTALL'.
call method of zword 'EDITCOPY'.
call method of zword 'DOCCLOSE'
exporting
#1 = 2.
call method of zword 'FILENEW'.
loop at i_lifnr.
For each supplier
Paste the text from clipboard to document created
call method of zword 'EDITPASTE'.
endloop.
loop at i_lifnr.
call method of zword 'STARTOFDOCUMENT'.
........
........
Many thanks in advance for your help
BR