Bug 125338 - Saving DOC(M) as DOCX doesn't get rid of macro
Summary: Saving DOC(M) as DOCX doesn't get rid of macro
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: filters and storage (show other bugs)
(earliest affected)
5.4 all versions
Hardware: All All
: medium normal
Assignee: Not Assigned
Keywords: filter:docx, implementationError
: 129216 (view as bug list)
Depends on:
Blocks: DOCX-Corrupted Macro-VBA
  Show dependency treegraph
Reported: 2019-05-17 12:20 UTC by Aron Budea
Modified: 2022-08-29 22:49 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:
Regression By:

Sample DOC w macro (33.50 KB, application/msword)
2019-12-06 01:58 UTC, Aron Budea

Note You need to log in before you can comment on or make changes to this bug.
Description Aron Budea 2019-05-17 12:20:42 UTC
After the fix of bug 108269 the macros in DOCM files are roundtripped.
However, when saving a DOCM as DOCX, the macros should be removed, which does not happen currently.

Eg. after saving attachment 133753 [details] (a DOCM with a macro) as DOCX and reloading it, the usual macro dialog will show. Word fails to open such a DOCX.

Observed using LO (d6e8e41c22023bc15cc4c9659b33c1cc3d6edb75), / Windows 7.
Versions before 5.4 would be fine, because macros got discarded during save.
Comment 1 Aron Budea 2019-05-17 12:23:01 UTC
Btw, saving the file as ODT, then reloading and saving it as DOCX is a workaround.
Comment 2 raal 2019-05-20 16:13:11 UTC
Confirm with Version:
Build ID: 630db80d17616d635cf2e5f1d5a0852428b794a3
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: x11;
Comment 4 himajin100000 2019-09-07 09:42:45 UTC
oops,the last line was a typo.

Comment 5 Aron Budea 2019-12-06 01:58:41 UTC
Created attachment 156343 [details]
Sample DOC w macro

Same thing happens if the source is a DOC with macro. Attaching attachment 133753 [details] converted to DOC in Word as a sample for that.
When converted to DOCX in LO, the macro persists.
Comment 6 Aron Budea 2019-12-06 02:02:20 UTC
*** Bug 129216 has been marked as a duplicate of this bug. ***
Comment 7 QA Administrators 2021-12-06 04:05:41 UTC Comment hidden (obsolete)
Comment 8 Aron Budea 2021-12-06 04:40:23 UTC
Still in LO (ba7db98cca3d8516697c94ef0d6af27db9e1655e) / Ubuntu.