I have a project where I would like to change direction of the text in MS Word format. In my project I used Microsoft.Office.Interop.Word
, What are your experiences?
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:
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:
wdTextOrientationDownward
wdTextOrientationHorizontal
WdTextOrientation.wdTextOrientationHorizontalRotatedFarEast
WdTextOrientation.wdTextOrientationUpward
WdTextOrientation.wdTextOrientationVertical
WdTextOrientation.wdTextOrientationVerticalFarEast
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.