No margins at header photo of report using ActXWord

3 次查看(过去 30 天)
Hi,
I have created a word report using matlab code (ActXWord).
For the header i import a picture, which i would like to have no margins and cover the header from the upper left corner of page.
ActXWord.Selection.Application.ActiveWindow.View.SeekView = 1; % go to header
ActXWord.Selection.ParagraphFormat.Alignment=0; % left allignment
WordHandle.Sections.Item(1).Headers.Item(1).Range.InlineShapes.AddPicture([pwd '\header_photo.png'],0,1);
Before i have set the margins of the main body of report:
ActXWord.Selection.Pagesetup.RightMargin=28.34646 * 2;
ActXWord.Selection.Pagesetup.LeftMargin=28.34646 * 2;
ActXWord.Selection.Pagesetup.TopMargin=28.34646 * 2.54;
ActXWord.Selection.Pagesetup.BottomMargin=28.34646 * 2.54;
That way the header photo is complying to main body margins.
How to set different margins for the header photo of word header without changing the main body margins?
Thanks in advance!

回答(0 个)

类别

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

Community Treasure Hunt

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

Start Hunting!

Translated by