Sunday, 15 September 2013

vba - In a Word Form how to detect the field the cursor is sitting on -


I have word form with some fields and a command-button. When the user clicks on that button, The back VBA code likes to dump a certain text (such as "ABC"), whatever cursor it is on. All my searches show that I have to use the name of the field, but I do not know who the cursor is sitting on. Post-Text "itemprop =" text ">

My problem was that I was looking for a kind of property of formfield. I did not find any one, however, the following single description gives the desired text to any form field Which currently is sitting on the cursor:

  selection.ange = "ABC"    

No comments:

Post a Comment