[英]How can I change direction of the text in Word?
I have a project where I would like to change direction of the text in MS Word format. 我有一个项目,我想更改MS Word格式的文本方向。 In my project I used
Microsoft.Office.Interop.Word
, What are your experiences? 在我的项目中,我使用了
Microsoft.Office.Interop.Word
,您的经历是什么?
Word.Application w= new Word.Application();
object objMissing = System.Reflection.Missing.Value;
Word.Paragraph wp= w.Paragraphs.Add(ref objMissing);
wp.ReadingOrder = WdReadingOrder.wdReadingOrderRtl;
I think you mean Orientation
of a text or actually a Range
that you can change it like this: 我认为您的意思是文本的
Orientation
或实际上是可以更改的Range
,如下所示:
document.Words.Last.Orientation = Word.WdTextOrientation.wdTextOrientationDownward;
or for a cell of a table: 或用于表格的单元格:
table.Rows[1].Cells[1].Range.Orientation = Word.WdTextOrientation.wdTextOrientationUpward;
Word.WdTextOrientation
enum has below values: Word.WdTextOrientation
枚举具有以下值:
wdTextOrientationDownward
wdTextOrientationHorizontal
WdTextOrientation.wdTextOrientationHorizontalRotatedFarEast
WdTextOrientation.wdTextOrientationUpward
WdTextOrientation.wdTextOrientationVertical
WdTextOrientation.wdTextOrientationVerticalFarEast
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.