C
Christopher Deel
I am having trouble selecting a form field using VBA code.
This is based on the article "The best way to select a form field
using VBA" on the MVP website, written by Mark Tangard.
http://word.mvps.org/FAQS/TblsFldsFms/GotoFormField.htm
He suggests using:
ActiveDocument.Bookmarks("Text4").Range.Fields(1).Result.Select
rather than:
ActiveDocument.FormFields("Text4").Range.Select
or
ActiveDocument.FormFields("Text4").Select
or
Selection.GoTo What:=wdGoToBookmark, Name:="Text4"
When I incorporated that line into my "FieldNav" macro (to alter the defalt
order in which form fields are tabbed into) everything _appeared_ to work
well (i.e. whole field turned dark, no screen "jumping", etc.)
But when I tried using the form, I found that the *first character* I typed
after moving to a form field with that macro *did not appear*. The text
only started appearing from the 2nd character typed in.
Did I do something wrong? Or is there no good solution for this?
Has anyone observed the same problem?
This is based on the article "The best way to select a form field
using VBA" on the MVP website, written by Mark Tangard.
http://word.mvps.org/FAQS/TblsFldsFms/GotoFormField.htm
He suggests using:
ActiveDocument.Bookmarks("Text4").Range.Fields(1).Result.Select
rather than:
ActiveDocument.FormFields("Text4").Range.Select
or
ActiveDocument.FormFields("Text4").Select
or
Selection.GoTo What:=wdGoToBookmark, Name:="Text4"
When I incorporated that line into my "FieldNav" macro (to alter the defalt
order in which form fields are tabbed into) everything _appeared_ to work
well (i.e. whole field turned dark, no screen "jumping", etc.)
But when I tried using the form, I found that the *first character* I typed
after moving to a form field with that macro *did not appear*. The text
only started appearing from the 2nd character typed in.
Did I do something wrong? Or is there no good solution for this?
Has anyone observed the same problem?