Tried unprotecting and reprotecting around the script, and while it does seem to let me run the macro now... it's not DOING anything. The arrow keys simply act just like normal arrow keys, moving in and out of the form fields, instead of doing what I want them to do.
I'm starting to lose heart. :)
Well, here's an interesting hiccup.
I tried doing what you suggested, and created a macro for the drop-down field to run on entry. The macro:
Sub ArrowKeysOn()
' This macro will reassign the arrow keys when you tab into a drop-down field.
CustomizationContext = ActiveDocument
' Bind...
Awesome. So I guess now the question is what can I use instead of Selection.FormFields(1), since I'm using text fields? Also, since I want the down key to have normal usage when I DON'T have a drop-down selected, what would be the best method to use? I figured that I could use...
Tony: Hmm. I was trying to use the following entry:
KeyBindings.Add KeyCode:=BuildKeyCode(wdKeyReturn), KeyCategory:=wdKeyCategoryMacro, Command:="EnterKeyMacro"
for an arrow key... But there doesn't appear to be a wdKeyDown or anything like that.
Frederico: Yes, that's exactly right. The...
Yeah, I've noticed that Word is acting funky with the Selection.FormFields(1) action and text boxes. I may have to retool this...
So here's the description of what I'm using the form for. Technically, it's not a form, it's a template. It's a predefined template page which contains certain...
Gerry: I was about to write something about that only selecting the first object in the document, but the Selection.Formfield(1) means that it's the first object in the selection, doesn't it? That should work great. Thanks!
Frederico: Truth be told, I suppose it's mainly because I have...
Yes, I've seen that too—Alt-up/down arrowkey also brings up the list, but it's really not what we're looking for. The idea behind a form like this is speed, and when somebody who doesn't know that you can hit F4 goes to fill out the form, they're going to want to use either the arrowkeys or the...
Tony,
Thank you, that was EXACTLY what I was looking for. Since this form is protected and is only meant to be filled out electronically, we don't have to worry about the Enter key action (in fact, we don't WANT the Enter key to do its default function, as this messes with the layout of the...
Ah, now I see what you're talking about. However, I don't see an "EnterKeyBehavior" property in the properties for the text box...
Ah, wait. Yes, I do, but I think I've been misunderstood. You seem to be talking about a text field in a UserForm, whereas I'm talking about formfields in the...
I'm using Word 2003, and I can't seem to find this property. Where might I find it and/or set it?
Plus, even though I might be able to fix this particular issue with a different method (as with the initial reponse), I'd still like to know if it's possible to simply remap one key to use...
I'm working on creating a form in Word. We're trying to see if there's a way we can use Enter to navigate through the form, and although Microsoft has a way to do that in its Knowledge Base, it's not quite what we need, for this reason:
When you use the Microsoft script to navigate through a...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.