Open Word
Press keys
ALT+
F8
Type:
FractionFormat (in the Macro Name, box)
Click the
Create button
The NewMacros (Code) window will open
Copy (copy and paste) the following into that window, pasting over what is already there)
Sub FractionFormat()
'Highlight fraction x/y and run macro
Dim OrigFrac As String
Dim Numerator As String, Denominator As String
Dim NewSlashChar As String
Dim SlashPos As Integer
NewSlashChar = "/"
OrigFrac = Selection
SlashPos = InStr(OrigFrac, "/")
Numerator = Left(OrigFrac, SlashPos - 1)
Denominator = Right(OrigFrac, Len(OrigFrac) - SlashPos)
Selection.Font.Superscript = True
Selection.TypeText Text:=Numerator
Selection.Font.Superscript = False
Selection.TypeText Text:=NewSlashChar
Selection.Font.Subscript = True
Selection.TypeText Text:=Denominator
Selection.Font.Subscript = False
End Sub
Click the little (blue disk)
Save button, on the toolbar
Now click on
Insert (on the toolbar) then
Module
This will open a new Module window
Rename it to
FractionFormat (on the Left Side of the screen, under Properties Module1)
Then cut and paste the macro from the NewMacros module to the newly created FractionFormat Module.
Now close the editor fully (taking you back to the new Word document)
Right click the Quick Access Toolbar (
QAT) and select '
Customize Quick Access Toolbar'
Select "
Choose commands from" box, then select
Macros
Select your
FractionFormat macro, then select
Add
You may then select the
Modify button, to change the
pic and
label
Click
ok
Now
Back in the Word document, type a fraction like 12345/67890
Highlight (using left mouse drag over) the fraction
Locate your new button (likely right up the top of all the toolbars)
And click it.
WhaLa!
The real cool part, is you can use
letters as well !
This information has been dramatically cutdown from this page:
http://www.gmayor.com/installing_macro.htm
Please let me know if it worked. Or anyone else who'd like to submit their feelings too.
