Click here to Skip to main content
15,890,438 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I have a word document with several DocVariable-fields and I want to get the currently selected field. But only if the whole field is selected I'm getting the field with Document.Application.Selection.Fields. Does someone know how I could get the field even if only the cursor position is inside the field? I could get the next Field with selection.nextField or the previous with selection.previousField, but there is no way to get the currently selected field without selecting the whole field.

Thanks!
Posted
Updated 23-May-11 0:08am
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900