cancel
Showing results for 
Search instead for 
Did you mean: 

Open Word in WebDynpro and replace text

martin_schssler
Explorer
0 Kudos

Hallo,

I need help with the OfficeControl in Webdynpro. Following Scenario:

I've an alv table with informations wich I would print to a word document template. The word template is in the mime repository.

I read the template from the mime repository with the following method: mime_repository->get. And now I will replace some text-symbols.

How can I convert the xstring from the mime method? For example to xml or string wich I can handle in ABAP to replace the Text-symbols. Or is there an other way to do this?

Thank you for all ideas!

Best regards

Martin

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

hi

How can I convert the xstring from the mime method? For example to xml or string

u can convert ur data in internal tableto xml


data xml_out type xstring.

 call transformation id
        source itab
        result xml xml_out.

refer thomas' reply in the thread

regards,

amit

profitlich42
Participant
0 Kudos

With Word >= 2003 you can save your document as a xml file. Isn't it possible to use this xml File as your template?

martin_schssler
Explorer
0 Kudos

>

> With Word >= 2003 you can save your document as a xml file. Isn't it possible to use this xml File as your template?

Hallo Andreas,

how can I upload the docx-file? If I do this with the standard function I got the message: Die Dateinameerweiterung entspricht nicht dem MIME-typen application/vnd.openxmlformats-officedocument.word.

Have you any Idea?

Greetings

Martin

profitlich42
Participant
0 Kudos

Hi Martin,

try it with ".docx" for "application/vnd.openxmlformats-officedocument.wordprocessingml.document"

martin_schssler
Explorer
0 Kudos

>

> try it with ".docx" for "application/vnd.openxmlformats-officedocument.wordprocessingml.document"

Hallo Andreas,

the enhancement 'docx' is not the ending what SAP requires, I don't know why. I get an attention message.

I need a coding example for this problem: 'How can I read the text'.

Thank's for your help.

Greetings

Martin