Activedocument.saveas using .DOCX format

Add-in Express™ Support Service
That's what is more important than anything else

Activedocument.saveas using .DOCX format
Destaque Empreendimentos em Informática

Posts: 41
Joined: 2011-03-10
Dear friends,

I'm trying to intercept save event in MSWord but I'm stuck using .docx format. I can't find a way to save the document I the new word format as there is no constant for it in the API.

The same issue had been treated before in the following post:

But going to the VCL documentation I can't find any about my problem.

What is the trick?

Mario Scheel
Posted 16 May, 2014 13:11:43 Top
Andrei Smolin

Add-in Express team

Posts: 14976
Joined: 2006-05-11
Hello Mario,

You can use late binding.

The VBA code below is valid for Office 2010-2013:
WordApp.ActiveDocument.SaveAs2 "d:\aaa.docx", WdSaveFormat.wdFormatXMLDocument

SaveAs2 is described at WdSaveFormat.wdFormatXMLDocument is 12.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 19 May, 2014 02:57:37 Top