This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.


Package: mlreportgen.dom

Set OPC core properties of output document or template


corePropertiesOut = setCoreProperties(path,corePropertiesObj)



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


collapse 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');
coreProps = Document.getCoreProperties('mydoc.docx');
coreProps.Title = 'MATLAB Example';

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

Input Arguments

collapse 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

collapse all

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

Introduced in R2014b