write a standard enthalpy change sign

My wife, Lana Rude, used to spend ages calling up a delta sign then fiddling about getting a standard sign by superscripting a o and scoring a line through it. So I wrote a macro which adds the standard enthalpy sign below:

The r is lowered by 1 point and the standard sign is the Greek capital letter theta, Unicode symbol 03F4, also known as HTML entity 1012. This is superscripted, raised by 3 points and made font 8.

Sub DeltaHStandard()

'add delta sign
Selection.InsertSymbol Font:="Arial", CharacterNumber:=916, Unicode:=True

'switch to subscript and add r
Selection.Font.Subscript = wdToggle
    With Selection.Font
        .Name = "Arial"
        .Size = 11
        .Position = -1
    End With
Selection.TypeText Text:="r"

'switch back from subscript and add H
Selection.Font.Subscript = wdToggle
With Selection.Font
        .Name = "Arial"
        .Size = 11
        .Position = 0
    End With
Selection.TypeText Text:="H"
    
'switch to superscript and add standard sign
Selection.Font.Superscript = wdToggle
    With Selection.Font
        .Name = "Arial"
        .Size = 8
        .Position = 3
    End With
Selection.InsertSymbol Font:="Arial", CharacterNumber:=1012, Unicode:=True
    
'switch back from superscript and add a space
Selection.Font.Superscript = wdToggle
Selection.Font.Size = 11
With Selection.Font
        .Name = "Arial"
        .Size = 11
        .Position = 0
End With
Selection.TypeText Text:=" "
    
End Sub

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: