having a word document with the following cell:
accessing the cells text like this using Microsoft.Office.Interop.Word:
Document doc = ap.Documents.Open(path, ReadOnly: true, Visible: false);
Table docTable = doc.Tables[1];
string field = table.Rows[12].Cells[2].Range.Text
text result is:
\u0015 will be taken over from employee (wird übernommen von MA)
\u0015 needs to be ordered (muss neu bestellt werden)
\u0015 no need for Laptop/PC (braucht kein Laptop/PC)
\u0015
is the small checkbox in the word file. But no matter, if the checkbox is checked or not, the char representation is \u0015
.
is there any way to determine if the little checkbox from \u0015 no need for Laptop/PC (braucht kein Laptop/PC)
is checked or not?
You can use the FormFields
property of the Document class to access the controls. Then you can use the CheckBox property which returns a CheckBox
object that represents a check box form field.
ActiveDocument.FormFields(1).CheckBox.Value = False