Main Content

zipDOCXTemplate

Package unzipped DOTX template into DOTX file

    Description

    example

    zipDOCXTemplate(unzippedTemplateFolder) zips the unzipped template files specified by the directory unzippedTemplateFolder. The resulting zipped template file name is the name specified in unzippedTemplateFolder, plus the file extension .dotx. The zipped template folder structure duplicates the folder structure of the unzipped template. The file names in the unzipped template must contain only ASCII characters. The unzipped directory must contain a valid DOTX template package structure based on OOXML standard.

    example

    zipDOCXTemplate(zippedTemplate,unzippedTemplateFolder) packages the unzipped DOTX template into the file specified by zippedTemplate. The resulting compressed template preserves the directory structure of the uncompressed template. The zipDOCXTemplate function zips all of the files in the unzipped template folder, including files in subfolders.

    Examples

    collapse all

    Package the template in the folder myTemplate into a DOTX file called myTemplate.dotx.

    zipDOCXTemplate("myTemplate");

    Package the template in the folder myTemplate into a DOTX file called myReportTemplate.dotx.

    zipDOCXTemplate("myReportTemplate.dotx","myTemplate");

    Input Arguments

    collapse all

    Path to folder containing unzipped template files, specified as a string scalar or character vector.

    Full path for the packaged DOTX template specified as a string scalar or character vector.

    Introduced in R2017b