On further reflection, it might be easier to format the EQ field if you used
the \A switch rather than the \O switch. The following macro will insert
such formatted field . You can adjust the amount the current font size is
reduced by at the line oRng.Font.Size = iSize * 0.5
Dim sNum As String
Dim sDen As String
Dim oRng As Range
Dim iSize As Integer
sNum = InputBox("Enter the superscripted number")
sDen = InputBox("Enter the subscripted number")
ActiveDocument.ActiveWindow.View.ShowFieldCodes = True
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:= _
"EQ \A(" & sNum & "," & sDen & ")", PreserveFormatting:=False
Selection.MoveLeft Unit:=wdCharacter, Count:=1, Extend:=wdExtend
iSize = Selection.Font.Size
Set oRng = Selection.Range
oRng.Font.Size = iSize * 0.5
ActiveDocument.ActiveWindow.View.ShowFieldCodes = False
With Selection
.MoveRight Unit:=wdCharacter, Count:=1
.Font.Reset
End With
http://www.gmayor.com/installing_macro.htm
--
Graham Mayor - Word MVP
My web site
www.gmayor.com
Word MVP web site
http://word.mvps.org
Graham Mayor wrote:
You can use an EQ field (or the equation editor) eg
{ EQ \O(12,24) } with (say) the 12 formatted as superscript and the
24 as subscript (substitute your own numbers as necessary). For
repeats, save the formatted fields as autotext or autocorrect entries.
Paul64 wrote:
I am writing a scientific assignment which deals with isotopes. These
are identified by a superscript denoting the mass number directly
above a subscript denoting the atomic number, followed by the
chemical symbol eg U for uranium. Does anyone know how I can do this
in Word?