tempDirectory and the docx format

Hello,
I have a question regarding saving large Word documents using Aspose.Words for Java (about 3000 pages, using very large tables). There is a class called SaveOptions, where I can set a temporary directory using tempDirectory String field. It should help me to avoid OutOfMemory exception. The question is, which descenedant of the abstract SaveOptions class should I use in order to get the .docx output file? As the documentation says, tempDirectory works for both .docx and .doc formats. But there is no DocXSaveOptions class, only DocSaveOptions.
Thanks.

P.S.

I know that Word doesn’t like large documents, but such are the specifications I can’t change.

Hi Oleg,
Thanks for your inquiry. You should use OoxmlSaveOptions:
https://reference.aspose.com/words/java/com.aspose.words/ooxmlsaveoptions/
Best regards,