views:

55

answers:

1

Okay, I am creating an application in C#. That application needs to create a MS Word document out of the template. That template contains a table and a bookmark stored in one of the table's cells. I need to reference that cell, i.e. I need to determine it's row and column. Thanks for all the help.

A: 

Well, this turned out to be quite a nuisance. However, I came up with a little trick: Bookmarks are not related to table cells in any way. There is no way to determine the cell from bookmark. What is possible, however, is to set the value at the bookmarked position and then to iterate through the table cells looking for that value. Once the value is found, we can reference the cell and delete that value if necessary. So, the (temp) value serves as a mediator between the bookmark and the cell. Neat!

Boris