Zotero在word中插入带超链接的参考文献/交叉引用/跳转参考文献时题目报错问题解决

又到一年毕业季 ,毕业论文令人头痛不已,

已经有大佬利用word宏解决了大部分的问题http://t.csdnimg.cn/HspZV

但我实际使用中出现了题目报错,大佬的经验我看都看不懂...经过我与GPT一下午的赋能,终于解决问题:1.题目第一个为数字,如3D-printing,报错;2.题目中包含”/“、”<“、”>“等特殊符号的报错。

直接贴代码,用于没时间自己去解决的小伙伴,但要是还有啥问题直接问你的GPT!(笑,我自己的一下午,不如GPT的30分钟

Public Sub ZoteroLinkCitation()
Dim nStart&, nEnd&
nStart = Selection.Start
nEnd = Selection.End
Application.ScreenUpdating = False
Dim title As String
Dim titleAnchor As String
Dim style As String
Dim fieldCode As String
Dim numOrYear As String
Dim pos&, n1&, n2&

ActiveWindow.View.ShowFieldCodes = True
Selection.Find.ClearFormatting
With Selection.Find
    .Text = "^d ADDIN ZOTERO_BIBL"
    .Replacement.Text = ""
 

你可能感兴趣的:(word,c#,开发语言)