B
Becky Carter Hickman-Jones
Hi,
In one of the inherited macros I've got here at work, there is a list of
commonly-used but hard-to-locate mathematical and scientific characters
displayed in a menu for authors to get at easily rather than hunting for.
One of the macros, which simply inserts the desired character, reads, for
example:
Public Sub Alpha()
DoSymbolInsertion True, 945, True
End Sub
The "DoSymbolInsertion" macro reads thusly:
Private Sub DoSymbolInsertion(bDoSpaces As Boolean, lCharCode As Long,
bUseFontStyle As Boolean)
'If bDoSpaces Then
' Selection.InsertAfter " "
' Selection.Collapse wdCollapseEnd
' Selection.Move Unit:=wdCharacter, Count:=-1
'End If
If bUseFontStyle Then
Selection.Range.InsertSymbol Font:="Times New Roman",
CharacterNumber:=lCharCode, unicode:=True
Else
Selection.Range.InsertSymbol CharacterNumber:=lCharCode,
unicode:=True
End If
If bDoSpaces Then
Selection.Move wdCharacter, 1
End If
Exit Sub
End Sub
I have dozens of these little scripts to insert dozens of different
characters. They work fine, but I need to add new characters, and I'm not
sure how to represent them in this format. I mean, what is the number "945"
in the Alpha script above? It's not the unicode character number of the
lower case Greek alpha (in this example), and it's not the ASCII (decimal)
value either, or at least not as listed by Word in the Insert > Symbol box.
So I'm not sure where the number came from and what its equivalent is. The
person who created these macros has fallen off the face of the Earth, and I
can't get an answer from anyone else. In fact, I'm not even sure exactly
what the DoSymbolInsertion macro does! All I know is that it works and I
need to add to it.
Could I get some advice or a point in the right direction?
Thanks,
Beck
In one of the inherited macros I've got here at work, there is a list of
commonly-used but hard-to-locate mathematical and scientific characters
displayed in a menu for authors to get at easily rather than hunting for.
One of the macros, which simply inserts the desired character, reads, for
example:
Public Sub Alpha()
DoSymbolInsertion True, 945, True
End Sub
The "DoSymbolInsertion" macro reads thusly:
Private Sub DoSymbolInsertion(bDoSpaces As Boolean, lCharCode As Long,
bUseFontStyle As Boolean)
'If bDoSpaces Then
' Selection.InsertAfter " "
' Selection.Collapse wdCollapseEnd
' Selection.Move Unit:=wdCharacter, Count:=-1
'End If
If bUseFontStyle Then
Selection.Range.InsertSymbol Font:="Times New Roman",
CharacterNumber:=lCharCode, unicode:=True
Else
Selection.Range.InsertSymbol CharacterNumber:=lCharCode,
unicode:=True
End If
If bDoSpaces Then
Selection.Move wdCharacter, 1
End If
Exit Sub
End Sub
I have dozens of these little scripts to insert dozens of different
characters. They work fine, but I need to add new characters, and I'm not
sure how to represent them in this format. I mean, what is the number "945"
in the Alpha script above? It's not the unicode character number of the
lower case Greek alpha (in this example), and it's not the ASCII (decimal)
value either, or at least not as listed by Word in the Insert > Symbol box.
So I'm not sure where the number came from and what its equivalent is. The
person who created these macros has fallen off the face of the Earth, and I
can't get an answer from anyone else. In fact, I'm not even sure exactly
what the DoSymbolInsertion macro does! All I know is that it works and I
need to add to it.
Could I get some advice or a point in the right direction?
Thanks,
Beck