P
paleoWordFan
I am writing in regard to what appears to me to be a bug in the macro
processor for Word... though it may be that I am doing something wrong.
The macro I have recorded/written is as follows:
Sub changeRaisedtoSuperscript()
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "([0-9]*)"
.Font.Position = "2.5"
.Replacement.Text = "\1"
.Forward = True
.Format = True
.MatchWildcards = True
End With
With Selection.Find.Replacement.Font
.Position = 0
.Size = 8
.Superscript = True
.Subscript = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
As you can see, this is a very simple macro to convert numeric characters
which are raise by 2.5 points (to simulate superscript) into real Word
superscripts.
The trouble is that whenever the macro runs, the "2.5" is interpreted as
"2". I tried all means to get the ".5" into the macro without success. I
encountered this bug in Word 2003, and now in Word 2007.
I would really appreciate if someone could suggest a solution to the problem.
Thanks
/John
processor for Word... though it may be that I am doing something wrong.
The macro I have recorded/written is as follows:
Sub changeRaisedtoSuperscript()
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "([0-9]*)"
.Font.Position = "2.5"
.Replacement.Text = "\1"
.Forward = True
.Format = True
.MatchWildcards = True
End With
With Selection.Find.Replacement.Font
.Position = 0
.Size = 8
.Superscript = True
.Subscript = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
As you can see, this is a very simple macro to convert numeric characters
which are raise by 2.5 points (to simulate superscript) into real Word
superscripts.
The trouble is that whenever the macro runs, the "2.5" is interpreted as
"2". I tried all means to get the ".5" into the macro without success. I
encountered this bug in Word 2003, and now in Word 2007.
I would really appreciate if someone could suggest a solution to the problem.
Thanks
/John