C# Word Interop get page column from range

402 Views Asked by At

I use a three-column word document. After I have inserted text and paragraphs dynamically, i would like to find out in which column it is located. Is there a way to find out the column of the document using the range? if necessary, it would help to know the page distance from the left.

// Paragraph   
var range = document.Bookmarks.get_Item(@"\EndOfDoc").Range;
Word.Paragraph par = document.Content.Paragraphs.Add(range);
par.Range.InsertParagraphBefore();
par.Range.Text = "Paragraph";
par.Range.InsertParagraphAfter();
par.Range.Collapse(Word.WdCollapseDirection.wdCollapseEnd);

// Get Page Column
0

There are 0 best solutions below