How can I set landscape and margins in word using matlab activex
古いコメントを表示
I am using writetoword.m from the matlab file exchange to print figures and text to a word document but I would also like to make the document landscape orientation and change the right and left margins to 1cm as well.
I tried adding these lines of code at the beginning of the wrtietoword.m file after it creates the word document:-
This line gives no errors but does not seem to do anything and does not change the orientation to lanscape:- actXword.ActiveDocument.Pagesetup.Orientation = 'wdOrientLandscape';
Thesee lines give an error actXword.ActiveDocument.Pagesetup.LeftMargin = 'CentimetersToPoints(1)'; actXword.ActiveDocument.Pagesetup.RightMargin = 'CentimetersToPoints(1)';
Can anyone hep with the right syntax. Is there a good guide anywhere for the matlab activex syntax versions of VBA commands ?
thanks Andrew
採用された回答
その他の回答 (1 件)
Andrew Tilmouth
2012 年 11 月 2 日
0 投票
1 件のコメント
Jeff Shi
2015 年 9 月 15 日
Thanks a lot for the solution.
カテゴリ
ヘルプ センター および File Exchange で ActiveX についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!