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

2 次查看(过去 30 天)
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!

回答(1 个)

Rahul Singhal
Rahul Singhal 2019-7-25

类别

Help CenterFile Exchange 中查找有关 MATLAB Report Generator 的更多信息

产品


版本

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by