Hallo Christian,
hi Mike,
may I try to add my own decent bit,
based on Christian's idea,
as I've not heard about "InRange" before.
Sub test44444()
Dim r As Range
Dim l As Long
Set r = ActiveDocument.Range
r.End = Selection.Start
l = r.Fields.Count
If l > 0 Then
If Selection.InRange(r.Fields(l).result) Then
MsgBox "Inside field"
End If
End If
End Sub
But doesn't work with
ActiveWindow.View.ShowFieldCodes = true.
If you need a solution for that, too,
ask again.
Gruß
Helmut Weber, MVP WordVBA
"red.sys" & chr$(64) & "t-online.de"
Win XP, Office 2003