How can i get the range values of each bookmark in my word document? I want them to be shown in datagrid, so the code is:
int ii = 0;
Object obj;
var orderedBoomarks = WordDocument.Bookmarks.Cast<Bookmark>().OrderBy(d => d.Start).ToList();
foreach(Bookmark bookmark in orderedBoomarks)
{
obj = bookmark.Range;
dataGridView1.Rows.Add(bookmark.Name.ToString());
dataGridView1.Rows[ii].Cells[1].Value = obj.ToString();
ii++;
}
For now, the result in cell is "System.__ComObject". So, can i even get the numeric value of bookmark range?