I have a number of bookmarks which enclose either a blank space or a field. I now want to check whether, when a bookmark is selected which of the two it contains.
This is the code I have at the moment:
When I run the procedure it always tells me that the bookmark contains text irrespective of which type it holds.Dim oRng As Word.Range ActiveDocument.Bookmarks("ContentsFigures").Range.Select If Len(ActiveDocument.Bookmarks("ContentsFigures").Range.Text) = 0 Then MsgBox "No text in the bookmark" Else MsgBox "The bookmark holds text" End If
Where am I going wrong, please?
Roderick