操作书签很好弄,但是操作页脚中的书签有点特殊
public String WriteFooter(MSWord.Application wordApp, String bookMark, String text)
{
object Bookmark = (int)MSWord.WdGoToItem.wdGoToBookmark;
object NameBookMark = bookMark;
wordApp.ActiveWindow.ActivePane.View.SeekView = WdSeekView.wdSeekCurrentPageFooter;
wordApp.Selection.HeaderFooter.Range.Bookmarks.get_Item(ref NameBookMark).Select();
wordApp.Selection.TypeText(text);
wordApp.ActiveWindow.View.SeekView = WdSeekView.wdSeekMainDocument;
return "true";
}
其实就是先要进入页脚编辑,然后再写字!