You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2019/07/25 12:42:10 UTC

[Bug 63611] New: Add/Remove Macros to/from XWPFDocument

https://bz.apache.org/bugzilla/show_bug.cgi?id=63611

            Bug ID: 63611
           Summary: Add/Remove Macros to/from XWPFDocument
           Product: POI
           Version: 4.0.x-dev
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: XWPF
          Assignee: dev@poi.apache.org
          Reporter: rgransberger@gmx.de
  Target Milestone: ---

Created attachment 36684
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=36684&action=edit
Example Code DOCM/DOCX conversion

Here is some example code to be able to add a macro from an existing docm
document to an existing docx document and change the type to docm.

new DocumentConverter(docxFile).toDocm(macroDocmFile, outputDocmFile);

And also some code to remove the macro from a docm document and convert it to a
docx document.

new DocumentConverter(docmFile).toDocx(outputDocxFile);

Tested with POI 4.1 (with ooxml-schema 1.4) and Word 2016.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org