A
Abi
How do I create the small 2 that's placed slightly higher than the other
characters in for example the abbreviation CO2?
characters in for example the abbreviation CO2?
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
CyberTaz said:Actually, for chemicals like that the 2 should be "slightly *lower" not
higher.After the CO type Control+= then type the 2. Then type Control+=
again to turn Subscript off. Alternatively just type the 2, select it,
then
go to [depending on version of Word] Format> Font & apply Subscript.
HTH |:>)
Bob Jones
[MVP] Office:Mac
How do I create the small 2 that's placed slightly higher than the other
characters in for example the abbreviation CO2?
Actually, for chemicals like that the 2 should be "slightly *lower" not
higher.After the CO type Control+= then type the 2. Then type Control+=
again to turn Subscript off. Alternatively just type the 2, select it, then
go to [depending on version of Word] Format> Font & apply Subscript.
HTH |:>)
Bob Jones
[MVP] Office:Mac
How do I create the small 2 that's placed slightly higher than the other
characters in for example the abbreviation CO2?-
Herb Tyson said:...and if it's something you need frequently, consider creating an AutoCorrect entry to automatically convert co2 into the correct
format each time it's typed. I use AutoCorrect entries for h2o, h2so4, etc. It's very handy, and ultimately, a big time saver.
--
Herb Tyson MS MVP
Author of the Word 2007 Bible
Blog: http://word2007bible.herbtyson.com
Web: http://www.herbtyson.com
CyberTaz said:Actually, for chemicals like that the 2 should be "slightly *lower" not
higher.After the CO type Control+= then type the 2. Then type Control+=
again to turn Subscript off. Alternatively just type the 2, select it, then
go to [depending on version of Word] Format> Font & apply Subscript.
HTH |:>)
Bob Jones
[MVP] Office:Mac
How do I create the small 2 that's placed slightly higher than the other
characters in for example the abbreviation CO2?
macropod said:Hi Herb,
If you've got that many chemical formulae, a macro solution like the following might do the job more efficiently -
Sub ChemicalFormatter()
Dim oRng As Range, fRng As Range
Application.ScreenUpdating = False
With Selection
Set oRng = .Range
With .Find
.ClearFormatting
.Text = "[A-Z)][0-9]{1,}"
.MatchWildcards = True
.Wrap = wdFindContinue
.Forward = True
Do While .Execute = True
Set fRng = ActiveDocument.Range(Start:=Selection.Start + 1, End:=Selection.End)
fRng.Font.Subscript = True
fRng.Collapse Direction:=wdCollapseEnd
' Uncomment the next line to process only the selected range
If fRng.End = oRng.End Then Exit Do
Loop
End With
End With
oRng.Select
Set fRng = Nothing
Set oRng = Nothing
Application.ScreenUpdating = True
End Sub
The above macro will search for and process all 'chemical' formulae in the document in one pass. If your document has other
upper-case alphanumeric strings in which a number follows a letter (eg Table cell references), you'll need to uncomment the line
indicated and select the range(s) containing the text to be converted.
--
Cheers
macropod
[Microsoft MVP - Word]
Herb Tyson said:...and if it's something you need frequently, consider creating an AutoCorrect entry to automatically convert co2 into the
correct format each time it's typed. I use AutoCorrect entries for h2o, h2so4, etc. It's very handy, and ultimately, a big time
saver.
--
Herb Tyson MS MVP
Author of the Word 2007 Bible
Blog: http://word2007bible.herbtyson.com
Web: http://www.herbtyson.com
CyberTaz said:Actually, for chemicals like that the 2 should be "slightly *lower" not
higher.After the CO type Control+= then type the 2. Then type Control+=
again to turn Subscript off. Alternatively just type the 2, select it, then
go to [depending on version of Word] Format> Font & apply Subscript.
HTH |:>)
Bob Jones
[MVP] Office:Mac
On 5/2/09 3:27 PM, in article
(e-mail address removed), "Abi"
How do I create the small 2 that's placed slightly higher than the other
characters in for example the abbreviation CO2?
macropod said:Macro correction for processing just the selected range - change the code inside the loop to:
Set fRng = ActiveDocument.Range(Start:=Selection.Start + 1, End:=Selection.End)
' Uncomment the next line to process only the selected range
' If fRng.End >= oRng.End Then Exit Do
fRng.Font.Subscript = True
fRng.Collapse Direction:=wdCollapseEnd
--
Cheers
macropod
[Microsoft MVP - Word]
macropod said:Hi Herb,
If you've got that many chemical formulae, a macro solution like the following might do the job more efficiently -
Sub ChemicalFormatter()
Dim oRng As Range, fRng As Range
Application.ScreenUpdating = False
With Selection
Set oRng = .Range
With .Find
.ClearFormatting
.Text = "[A-Z)][0-9]{1,}"
.MatchWildcards = True
.Wrap = wdFindContinue
.Forward = True
Do While .Execute = True
Set fRng = ActiveDocument.Range(Start:=Selection.Start + 1, End:=Selection.End)
fRng.Font.Subscript = True
fRng.Collapse Direction:=wdCollapseEnd
' Uncomment the next line to process only the selected range
If fRng.End = oRng.End Then Exit Do
Loop
End With
End With
oRng.Select
Set fRng = Nothing
Set oRng = Nothing
Application.ScreenUpdating = True
End Sub
The above macro will search for and process all 'chemical' formulae in the document in one pass. If your document has other
upper-case alphanumeric strings in which a number follows a letter (eg Table cell references), you'll need to uncomment the line
indicated and select the range(s) containing the text to be converted.
--
Cheers
macropod
[Microsoft MVP - Word]
Herb Tyson said:...and if it's something you need frequently, consider creating an AutoCorrect entry to automatically convert co2 into the
correct format each time it's typed. I use AutoCorrect entries for h2o, h2so4, etc. It's very handy, and ultimately, a big time
saver.
--
Herb Tyson MS MVP
Author of the Word 2007 Bible
Blog: http://word2007bible.herbtyson.com
Web: http://www.herbtyson.com
Actually, for chemicals like that the 2 should be "slightly *lower" not
higher.After the CO type Control+= then type the 2. Then type Control+=
again to turn Subscript off. Alternatively just type the 2, select it, then
go to [depending on version of Word] Format> Font & apply Subscript.
HTH |:>)
Bob Jones
[MVP] Office:Mac
On 5/2/09 3:27 PM, in article
(e-mail address removed), "Abi"
How do I create the small 2 that's placed slightly higher than the other
characters in for example the abbreviation CO2?
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.