Force a user to save a file as an open xml file type

Modified on Mon, 5 Oct at 1:54 PM

The purpose of this feature is to update a document/presentation/spreadsheet to the open xml type of file. This is valid for all legacy documents created before 2003 (when Microsoft introduced OpenXML structure). We need it because we want to store some info about the document in the CustomXML and since the legacy documents do not support it, we need to upgrade them.

CMD

<Cmd case="BaseExtensions:save-as-openxml"/>

After executing this, the user receives a file dialog to save this file in a newer format (OpenXML one). If the save was successful, the commands that are defined afterwards will be executed. In contrast, if the save was unsuccessful or the user pressed "Cancel", all commands after the above will not executed.

Example of usage

Example from a client (anonymized with "[clientname]":

XML
<Cmd case="BaseExtensions:save-as-openxml"/>
<Cmd case="BaseExtensions:AddCustomXml">
  <TemplafyFormConfiguration>Some data</TemplafyFormConfiguration>
</Cmd>
<Cmd case="BaseExtensions:AddCustomXml">
 <TemplafyTemplateConfiguration>Some data</TemplafyTemplateConfiguration>
</Cmd>
<Cmd case="BaseExtensions:content-create" type="document-property" name="TemplafyTenantId" value="[clientname]"/>
<Cmd case="BaseExtensions:content-create" type="document-property" name="TemplafyTemplateId" value="996904937100485859"/>

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article