Can I apply a header from Open API code before applying a template when generating using doc from scratch.
IReportDiagramOption reportDiagramOption = IModelElementFactory.instance().createReportDiagramOption();
reportDiagramOption.setUseWordDocumnentTemplate( true );
reportDiagramOption.setWordDocumnentTemplatePath( coverPagePath );
reportDiagramDetails.setReportDiagramOption( reportDiagramOption );
reportDiagramDetails.addRDPageBreakTemplate( IModelElementFactory.instance().createRDPageBreakTemplate() );
// APPLY A HEADER HERE DIRECTLY BEFORE APPLYING THE TEMPLATE BELOW
// SIMILAR TO THE WAY I ADDED A PAGE BREAK ABOVE
reportDiagramDetails.addSomeHeaderHere("This is the title maybe");
IRDOOTemplate currentIRDOOTemplate = reportDiagramDetails.createRDOOTemplate();
currentIRDOOTemplate.setTemplateURI(templateName);
currentIRDOOTemplate.setSourceType(1);
currentIRDOOTemplate.setSourceId(archiMateDiagram.getId());
reportDiagramDetails.addTemplate(currentIRDOOTemplate);
ApplicationManager.instance().getDocumentationManager().generateDocComposerWord( reportDiagramUIModel, new File( docName ), null);