Sub cs_citation_01()
' cs_citation_01 Macro
Dim fontSize As Integer
Dim fontName As String
Selection.MoveLeft Unit:=wdCharacter, Count:=1, Extend:=wdExtend
fontSize = Selection.Font.Size
fontName = Selection.Font.Name
Selection.MoveRight Unit:=wdCharacter, Count:=1, Extend:=wdExtend
SendKeys "{RIGHT}"
With Selection
.Font.Size = 14
.Font.Superscript = True
.TypeText Text:="[" & websiteName & "]"
selectTextToFormat (websiteName)
.Hyperlinks.Add Anchor:=Selection.Range, TextToDisplay:=Selection.Range.Text, Address:=hyperLink 'TextToDisplay:=Selection.Text
End With
Selection.Font.Superscript = False
'Superscript button still selected on MS Wo
' Selection.MoveRight Unit:=wdCharacter, Count:=1, Extend:=wdExtend
' SendKeys "{RIGHT}"
' SendKeys " "
' Selection.Font.Size = fontSize
' Selection.Font.Name = fontName
'MsgBox ("Ln53")
End Sub
I need the program to deselect, the SuperScript Notation, and to revert back to the font size of the character, preceding the bracket, [], tags.
Edit: The following is closest to what I'm trying to do, due to Extend:=wdMove instead of Extend:=wdExtend. But when used on the last line, the superscript notation is still 'enabled' in the GUI.
Selection.Font.Superscript = False
Selection.MoveRight Unit:=wdCharacter, Count:=1, Extend:=wdMove