Centring a table into a Word Doc.( Activex)
古いコメントを表示
Hi.
I'm using matlab to create a report which includes several figures, texts and tables. The point is, when I copy a table it is automatically aligned to the left, although the paragraph format is "center". I've tried to select the table and to align again the paragraph using this:
ActXWord.Selection.ParagraphFormat.Alignment = 'wdAlignParagraphCenter';
But it doesn't work (it centers the content of the table, not the table). could anyone help me? Thanks in advance :D
3 件のコメント
Iain
2014 年 10 月 8 日
Just guessing:
ActXWord.Selection.Alignment = 'wdCenter';
Belen
2014 年 10 月 27 日
Frederic Tschanz
2016 年 1 月 11 日
Try this:
table = document.Tables.Add(selection.Range,numRows,numCols); % insert a table
table.Rows.Alignment = 'wdAlignRowCenter'; % center the table
回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で ActiveX についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!