Report generator only showing names of the objects instead of their content

2 visualizaciones (últimos 30 días)
Hello everyone!
I have a code generating a full report but I want to add an image in the header so I created a template and tried out. But now the word file only gives me the name of the objects in the report and not the actual content like this:
Do anyone know where does this problem comes from?
My code is
rpt = Document('Report','docx', 'template.dotx');
moveToNextHole(rpt)
%% title page generation
tp = TitlePage;
tp.Title = 'Report';
tp.Subtitle = 'This report is generated from the test.';
tp.Author = 'Jack'
append(rpt, tp);
%% Adding table of contents
append(rpt, TableOfContents);
%% Summary of the whole regressiotest
ChapterRegression = Chapter;
ChapterRegression.Title = 'Summary';
SectionIntro = Section;
SectionIntro.Title = 'Introduction';
para = Paragraph('The test script ran all the tests.');
para.Style = {FontSize('14pt'), FirstLineIndent('0.2in')};
add(SectionIntro, para);
add(ChapterRegression, SectionIntro);
append(rpt, ChapterRegression)
close(rpt)
My dotx template just have one Rich Text Content Control hole.
Thank you in advance!

Respuestas (1)

Rahul Singhal
Rahul Singhal el 25 de Jul. de 2019

Categorías

Más información sobre MATLAB Report Generator en Help Center y File Exchange.

Productos


Versión

R2018a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by