Loosing custom styles after export to docx

I have to export my document to docx. However I am loosing all custom styles and TextBody style. All missing styles are converted to DefaultStyle and the document is messed up. Thank you for any help. Petr

ps: Version: 5.1.6.2
Build ID: 07ac168c60a517dba0f0d7bc7540f5afa45f0909
CPU Threads: 4; OS Version: Mac OS X 10.11.6; UI Render: default;
Locale: en-US (en.UTF-8); Calc: group

There are several bugs in relation, if some it’s in relation with yours, please add your comment otherwise please report a new one. https://bugs.documentfoundation.org/buglist.cgi?quicksearch=DOCX%20STYLE&list_id=654873

I tried to create new odt document, made new styles and saved it as docx. And it works correctly. Something is wrong with my big document. How can I find the cause?

Try copying all and paste on a new file.

Success, thank you.

Add as answer so it can be marked as solved.

Try copying all and paste on a new file.

A universal piece of advise: if you need interoperability with M$ Office, export to DOC rather than to DOCX. I haven’t had any problem of that kind with DOC.

I tried doc format and the behaviour is the same. The document was initially stored as a docx. When I got it, I converted it to odt, did a lot of changes and now I am trying to export it back to docx. When I did some changes directly to the original docx, the styles were stored correctly. Hence I did not expected that such a problem may occur and I worked long time with my odt version of the document.