Word Interop:如何插入引文字段? [英] Word Interop: how to insert a citation field?

查看:49
本文介绍了Word Interop:如何插入引文字段?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个选择并想用它来插入引文.目前,我使用

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);

我认为插入引文会类似,但没有看到与 Document.InsertCitation()Document.Bibliography.InsertCitation() 等效的内容?

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

推荐答案

Try TableOfAuthorities ??这适用于 VBA

Try TableOfAuthorities ?? That works in VBA

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

这篇关于Word Interop:如何插入引文字段?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆