This project is read-only.

How To Edit

Mar 13, 2014 at 11:58 AM
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?

For the brackets it is:
Just remove the content of the openbracket and closebracket elements.
For superscript it is:
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

' 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
        Selection.Style = s
    End If
End Sub
Mar 14, 2014 at 9:48 AM
What part do you need help with?

The first part, changing the open and close brackets can be done by opening the XSL file in any text editor (e.g. notepad).

The second part, is just a simple macro. If you have no idea on what macros are, or how they can be used, just look online. There are plenty of sources with information on them, including Graham Mayor's excellent Idiots' guide to installing macros.
Mar 15, 2014 at 11:45 PM
And it seems so simple when you know how!
Thanks for your help, I have dealt with the brackets and the superscript macro.

There is one more thing how do I remove the space between the sentence I wrote and the citation number?