Thank you for creating a Vancouver referencing system, it is a massive help with my work.
I need to slightly change it so that it has the brackets are removed and the numbers are superscript. I have done a bit of research and I found the codes that I need to add or edit. However, I do not know how to edit the original code.
Can you please advise me how to do this?
Cheers
For the brackets it is:
Sub ApplyCitationStyle()
I need to slightly change it so that it has the brackets are removed and the numbers are superscript. I have done a bit of research and I found the codes that I need to add or edit. However, I do not know how to edit the original code.
Can you please advise me how to do this?
Cheers
For the brackets it is:
Just remove the content of the openbracket and closebracket elements.For superscript it is:
<openbracket></openbracket>
<closebracket></closebracket>
Sub ApplyCitationStyle()
Dim stylename As String
Dim exists As Boolean
Dim s As Style
Dim fld As Field
stylename = "In-Text Citation"
' Check if the style already exists.
exists = False
For Each s In ActiveDocument.Styles
If s.NameLocal = stylename Then
exists = True
Exit For
End If
Next
' If the style did not exist yet, create it.
If exists = False Then
Set s = ActiveDocument.Styles.Add(stylename, wdStyleTypeCharacter)
s.BaseStyle = ActiveDocument.Styles(wdStyleDefaultParagraphFont).BaseStyle
s.Font.Superscript = True
End If
' Now that the style really exists, select it.
Set s = ActiveDocument.Styles(stylename)
' Apply the style to all in-text citations.
For Each fld In ActiveDocument.Fields
If fld.Type = wdFieldCitation Then
fld.Select
Selection.Style = s
End If
Next
End Sub