O
OTWarrior
I have a protected document that uses drop down form fields, and on exit I
want the form field to be reselected if a certain value is selected.
I am using this code for another area to get the name, but i haven't been
able to use it as a selection
If Selection.FormFields.Count = 1 Then 'No textbox but a check- or listbox
BKMname2 = Selection.FormFields(1).Name
ElseIf Selection.FormFields.Count = 0 And Selection.Bookmarks.Count > 0 Then
BKMname2 = Selection.Bookmarks(Selection.Bookmarks.Count).Name
End If
I have tried:
ActiveDocument.FormFields(BKMname2).Range.Select
Selection.GoTo What:=wdGoToBookmark, Name:=BKMname2
ActiveDocument.Bookmarks(BKMname2).Range.Fields(1).Result.Select
....And none of these seem to select the bookmark.
I can make it reselect the drop down menu when tab is pressed, that is not a
problme as i simply use:
SendKeys "{LEFT}"
SendKeys "%{DOWN}"
however the people using this form may not always use the tab key, or at all,
and i just want to cover myself, otherwise I will be bombarded by calls.
What am I doing wrong?
want the form field to be reselected if a certain value is selected.
I am using this code for another area to get the name, but i haven't been
able to use it as a selection
If Selection.FormFields.Count = 1 Then 'No textbox but a check- or listbox
BKMname2 = Selection.FormFields(1).Name
ElseIf Selection.FormFields.Count = 0 And Selection.Bookmarks.Count > 0 Then
BKMname2 = Selection.Bookmarks(Selection.Bookmarks.Count).Name
End If
I have tried:
ActiveDocument.FormFields(BKMname2).Range.Select
Selection.GoTo What:=wdGoToBookmark, Name:=BKMname2
ActiveDocument.Bookmarks(BKMname2).Range.Fields(1).Result.Select
....And none of these seem to select the bookmark.
I can make it reselect the drop down menu when tab is pressed, that is not a
problme as i simply use:
SendKeys "{LEFT}"
SendKeys "%{DOWN}"
however the people using this form may not always use the tab key, or at all,
and i just want to cover myself, otherwise I will be bombarded by calls.
What am I doing wrong?