c#操作word
用程序怎么去除word文档中的批注和修订?如下图所示:
--------------------编程问答-------------------- 学习。 --------------------编程问答-------------------- 接着学习 --------------------编程问答-------------------- 你可以去msdn查一下office自动化方面的资料,最好是word VBA的文档,找到api就可以了。 --------------------编程问答-------------------- VBA代码:
If Not mSheet.Cells(rowIndex, colIndex).comment Is Nothing Then
mSheet.Cells(rowIndex, colIndex).comment.Delete
mSheet.Cells(rowIndex, colIndex).AddComment (errorText)
Else
mSheet.Cells(rowIndex, colIndex).AddComment (errorText)
End If
C#的自己应该差不多 --------------------编程问答-------------------- 帮顶 --------------------编程问答-------------------- OK
System.Reflection.Missing missing = System.Reflection.Missing.Value;
sheet.get_Range("A1",missing).Comment.Delete();
这样是了,A1是要删除注释的单元格。
--------------------编程问答-------------------- --------------------编程问答--------------------
你这是操作excel还是word?
word好像没有单元格吧?
补充:.NET技术 , C#