Hi,
have a look at this one, just to get you going.
Whether it is working or not,
depends on how consistent your text is.
I am assuming, e.g., that Euro is followed
by _one_ space. If you want to cover all
possible variations including typos,
this could become pretty complicated.
Sub Test()
Dim sTmp As String
Dim rDcm As Range
Set rDcm = ActiveDocument.Range
With rDcm.Find
.Text = "Euro "
.MatchCase = True
While .Execute
rDcm.Collapse direction:=wdCollapseEnd
While IsNumeric(rDcm.Next) Or _
rDcm.Next = "." Or _
rDcm.Next = ","
rDcm.End = rDcm.End + 1
rDcm.Select ' for testing preferably in single step mode
Wend
sTmp = rDcm.Text
MsgBox CSng(sTmp)
' result probably depending on local settings
rDcm.Collapse direction:=wdCollapseEnd
rDcm.End = ActiveDocument.Range.End
Wend
End With
End Sub
sTmp is a string, though.
If you need the value in a variable of type single,
we could continue with a function for converting
a string into a single, which works regardless
of regional settings.
--
Greetings from Bavaria, Germany
Helmut Weber, MVP WordVBA
"red.sys" & chr(64) & "t-online.de"
Word 2002, Windows 2000
MarcoPolo - 27 Jan 2006 10:07 GMT
Danke schön !!!!!!!!!!!!!!!!!
> Hi,
>
[quoted text clipped - 41 lines]
> "red.sys" & chr(64) & "t-online.de"
> Word 2002, Windows 2000