Adding Headers and Footers to Holes in Template in Matlab Report

조회 수: 3 (최근 30일)
ahmed920
ahmed920 2019년 3월 12일
댓글: ahmed920 2019년 8월 9일
I have created a template in Microsoft word where I added Holes in the header and footer. Now I am trying to use matlab to fill it out.
This is the code I am using.
docHeaders = rpt.CurrentDOCXSection.PageHeaders;
while ~strcmp(docHeaders.CurrentHoleId,'#end#')
docHeaders.CurrentHoleId
docHeaders.CurrentHoleType
switch docHeaders.CurrentHoleId
case 'HeaderASTM'
append(docHeaders,app.ASTMVersionDropDown.Value);
end
moveToNextHole(docHeaders);
end
close(docHeaders);
the holes match, append method return an object, but when I open the document, the holes are empty.

답변 (1개)

ahmed920
ahmed920 2019년 8월 9일
No I havent. I did a work around instead where I created different versions of the word template
  댓글 수: 5
baptiste boudier
baptiste boudier 2019년 8월 9일
Yes it's like if Word needed a refresh at the end.
ahmed920
ahmed920 2019년 8월 9일
something like this might work.
https://www.mathworks.com/matlabcentral/answers/953-how-do-i-open-the-header-footer-in-a-word-programatically-from-matlab?s_tid=answers_rc1-3_p3_Topic

댓글을 달려면 로그인하십시오.

제품


릴리스

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by