I transfer the data to a word document with word automation. However, if the data is empty, I get output as shown in the picture. How do we ensure that a blank line appears if there is no data?
I have tried this but it didn't work.
if (dr["gorusme2"].ToString() == String.Empty) { myMergeField.Select(); oWord.Selection.TypeText(""); } else { if (fieldName == "gorusme2") { myMergeField.Select(); oWord.Selection.TypeText(dr["gorusme2"].ToString()); } }