GetHeader
function GetHeader(sType: HdrFtrType = null, isCreate: boolean = false): ApiDocumentContent
Description
Returns the content for the specified header type.
Parameters
Header type to get the content from.
- isCreate
boolean
false Specifies whether to create a new header or not with the specified header type in case no header with such a type could be found in the current section.
Returns
ApiDocumentContent
Try It
var oDocument = Api.GetDocument();
var oParagraph = oDocument.GetElement(0);
oParagraph.AddText("This is a page with a header. ");
oParagraph.AddText("See it above.");
var oSection = oDocument.GetFinalSection();
var oHeader = oSection.GetHeader("default", true);
oParagraph = oHeader.GetElement(0);
oParagraph.AddText("This is a page header");