I have code for finding and replacing fields in a Word document with values ββfrom a dataset.
Word.Document oWordDoc = new Word.Document(); foreach (Word.Field mergeField in oWordDoc.Fields) { mergeField.Select(); oWord.Selection.TypeText( stringValueFromDataSet ); }
In some cases, stringValueFromDataSet empty, and in addition to pasting nothing, I want to actually delete the current row.
Any idea how I can do this?
source share