Word Interop: how to insert a citation field?

夙愿已清 提交于 2021-01-29 07:12:44

问题


I have a Selection and would like to use it to insert a citation. Currently, I insert an index mark using

Selection sel;
    :
string cmd = "Lincoln, Abraham";
document.Indexes.MarkEntry(sel.Range, Entry: cmd);

I'm thinking that inserting a citation would be similar, but am not seeing the equivalent of Document.InsertCitation() or Document.Bibliography.InsertCitation()?


回答1:


Try TableOfAuthorities ?? That works in VBA

Document.TablesOfAuthorities.MarkCitation _
  Range:=Selection.Range, ShortCitation:=Selection.Range.Text, _
  LongCitation:="Michaels v. McVinney", Category:=1


来源:https://stackoverflow.com/questions/51845932/word-interop-how-to-insert-a-citation-field

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!