Main Content

mlreportgen.dom.Document.setCoreProperties

Class: mlreportgen.dom.Document
Namespace: mlreportgen.dom

Set OPC core properties of output document or template

Description

example

corePropertiesOut = mlreportgen.dom.Document.setCoreProperties(path,corePropertiesObj) sets the core OPC property values of the document or template having the specified path.

Examples

expand all

This example shows how to use setCoreProperties to apply core property settings to a report.

import mlreportgen.dom.*;
myReport = Document('mydoc','docx');

append(myReport,'Hello world');
close(myReport);
coreProps = Document.getCoreProperties('mydoc.docx');
coreProps.Title = 'MATLAB Example';
Document.setCoreProperties('mydoc.docx',coreProps)

In Windows® Explorer, if you navigate to the mydoc.docx file, you can see that the Title field says MATLAB Example.

Input Arguments

expand all

Path of document, document part, or template, specified as a character vector.

OPC core properties to use, specified as an mlreportgen.dom.CoreProperties object.

Output Arguments

expand all

OPC core properties, represented by an mlreportgen.dom.CoreProperties object.

Version History

Introduced in R2014b