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: 

Converting DOCM to DOCX in SAP environment

Former Member
0 Kudos
206

Hi,

We are currently working on implementing a Personnel File solution using Records Case Management (RCM). In here we work with templates based on DOCM-format documents, which contain a macro with available merge fields. The merging of fields is done in an own developed complex in SAP, and the merged document is then saved on an employee (case) record.

But the finished document is of course also in DOCM-format, like the template itself. However, we would like to transform this document to DOCX-format before saving it on the employee record.

I haven't been able to find any modules for this, no suggestions in documentation or on the internet/forums either.

Can this be done in SAP?

Best regards

Kim Petersen

3 REPLIES 3

anup_deshmukh4
Active Contributor
0 Kudos
84

Hello ,

Can't it be done using OLE automation ? .

Automate : 1. Open the file

2. save it as DOCX

Before you check for SOLE Tode and then you can see the demo using tcode OLE

Hope it helps ..!

0 Kudos
84

You are thinking of CREATE OBJECT word 'WORD.APPLICATION' and the likes? I will have to try that out, and then I'll get back to you. Thanks.

BR

Kim

Former Member
0 Kudos
84

Hi,

Finally got around to solving the issue. Using class CL_ABAP_ZIP I was able to handle the document as XML, deleting the necessary parts containing the macro, and the extension was changed to DOCX simply by saving as such.

BR

Kim