V
Vince
I am trying to write a macro to find raised text, specifically, I would like
to be able to find and replace the text raised by 3.5 points.
I wrote a simple macro to simply find the raised text:
' Macro to find text raised by 3 points and it works great
With ActiveDocument.Range.Find
.ClearFormatting
.Font.Position = 3 ' Finds text raised by 3 points
.Execute
End With
However, when I try to find raised text, raised by some decimal value (say)
3.5, the macro simply fails!
' Macro to find text raised by 3.5 points and it fails
With ActiveDocument.Range.Find
.ClearFormatting
.Font.Position = 3.5 ' Finds text raised by 3.5 points
' msgbox(font.position) ' This returns 4!!!! Apparently, I think that
the Font.position parameter is defined as an integer
.Execute
End With
How do I go about this? Is there someway to get it to accept and decimal
values as well? I also tried recording a macro after typing "3.5" in word's
Find and Replace box. The macro recorded doesn't work either and returns 4
as well. Is this some bug?
Thanks for any response.
Vince
to be able to find and replace the text raised by 3.5 points.
I wrote a simple macro to simply find the raised text:
' Macro to find text raised by 3 points and it works great
With ActiveDocument.Range.Find
.ClearFormatting
.Font.Position = 3 ' Finds text raised by 3 points
.Execute
End With
However, when I try to find raised text, raised by some decimal value (say)
3.5, the macro simply fails!
' Macro to find text raised by 3.5 points and it fails
With ActiveDocument.Range.Find
.ClearFormatting
.Font.Position = 3.5 ' Finds text raised by 3.5 points
' msgbox(font.position) ' This returns 4!!!! Apparently, I think that
the Font.position parameter is defined as an integer
.Execute
End With
How do I go about this? Is there someway to get it to accept and decimal
values as well? I also tried recording a macro after typing "3.5" in word's
Find and Replace box. The macro recorded doesn't work either and returns 4
as well. Is this some bug?
Thanks for any response.
Vince