User`s guide
11 Functions – Alphabetical List
11-40
mlreportgen.dom.Document.getOPCMainPart
Package: mlreportgen.dom
Return main part of document, document part, or template
Syntax
partOut = getOPCMainPart(path)
partOut = getOPCMainPart(path,docType)
Description
partOut = getOPCMainPart(path) returns the path of the main part (file) of a
package for a document, document part, or template, based on the specified path. The
returned path is relative to the root directory of the package, which is symbolized by a
forward slash (/). The main part is the file that contains the document or template XML
or HTML markup.
partOut = getOPCMainPart(path,docType) returns the relative path of the main
part of the output package of the specified type (Microsoft Word or HTML) of document,
document part, or template.
Examples
Get Path to Main Part of a Document Package
The example returns the path to the main part of an HTML document named
myDoc.htmx. The main part is named root.html, which is in the top-level folder of the
package.
import mlreportgen.dom.*;
myDocument = Document('myDoc','html');
append(myDocument,'Hello world');
close(myDocument);