使用word中的VBA工具箱(宏功能)编程,代码如下:
Sub ModifyZoteroCitationFormatting()
Dim zoteroField As Field
Dim citationRange As Range
' 寻找 Zotero 引用标号
For Each zoteroField In ActiveDocument.Fields
If InStr(zoteroField.Code.Text, "ADDIN ZOTERO_ITEM") > 0 Then
' 选择引用标号的范围
Set citationRange = zoteroField.Result
' 修改字体、字号、颜色、下划线和上标设置
With citationRange.Font
.Name = "Times New Roman"
.Size = 12
.Color = wdColorBlack
.Underline = wdUnderlineNone
.Superscript = True
End With
' 在修改之后取消选定
zoteroField.Select
End If
Next zoteroField
End Sub
可将代码名称命名为: ModifyZoteroCitationFormatting
这段代码会遍历文档中所有 Zotero 引用标号,并修改其字体格式为 Times New Roman、小四号、黑色、取消下划线,并将标号设置为上标。
该方法课可配合http://t.csdnimg.cn/rn8GZ 所介绍的内容使用