|
Prev: Apply another font to all text boxes within a canvas or to grouped text boxes
Next: Creating XLST / Transform File
From: mokshadavid on 28 Jun 2008 16:56 Excellent suggestion, works great. I didn't know if a protected form would allow that, but it allows the formula to calculate. NOW, if I can only find someone who can help me disable the ENTER key in a word 2002 form, then I will have a great form, that nobody would be albe to mess up. Thanks so much for your time and insight.
From: Jay Freedman on 28 Jun 2008 17:24 On Sat, 28 Jun 2008 13:56:00 -0700, mokshadavid <mokshadavid(a)discussions.microsoft.com> wrote: >Excellent suggestion, works great. I didn't know if a protected form would >allow that, but it allows the formula to calculate. > >NOW, if I can only find someone who can help me disable the ENTER key in a >word 2002 form, then I will have a great form, that nobody would be albe to >mess up. > >Thanks so much for your time and insight. The article at http://support.microsoft.com/?kbid=211219 shows how to make the Enter key work the same as the Tab key in a form, to move to the next field. -- Regards, Jay Freedman Microsoft Word MVP FAQ: http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit.
From: mokshadavid on 28 Jun 2008 17:48 Thanks, yes, I've read that article, but when a user presses enter to "TAB" to the next form-field, it doesn't apply the set numerical formatting in the form field, and it doesn't calculate in the SUM function I was asking about. I just want to totally disable the ENTER key when the document opens. A lot of programming thought went into that KB article, but I still think something like "set Enterkey=0" is what I need. Thanks for your interest. > The article at http://support.microsoft.com/?kbid=211219 shows how to make the > Enter key work the same as the Tab key in a form, to move to the next field. > > -- > Regards, > Jay Freedman > Microsoft Word MVP FAQ: http://word.mvps.org > Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit. >
From: Doug Robbins - Word MVP on 28 Jun 2008 18:45 Replace the macro in the KnowledgeBase Article with: Sub EnterKeyMacro() ' Check whether the document is protected for forms If ActiveDocument.ProtectionType <> wdAllowOnlyFormFields 'The document is not protected for forms, ' insert a carriage return. Selection.TypeText Chr(13) End If End Sub -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP "mokshadavid" <mokshadavid(a)discussions.microsoft.com> wrote in message news:BF97E662-E4EF-48FE-AA53-F56FB9019F8F(a)microsoft.com... > Thanks, yes, I've read that article, but when a user presses enter to > "TAB" > to the next form-field, it doesn't apply the set numerical formatting in > the > form field, and it doesn't calculate in the SUM function I was asking > about. > > I just want to totally disable the ENTER key when the document opens. A > lot > of programming thought went into that KB article, but I still think > something > like "set Enterkey=0" is what I need. > > Thanks for your interest. > > >> The article at http://support.microsoft.com/?kbid=211219 shows how to >> make the >> Enter key work the same as the Tab key in a form, to move to the next >> field. >> >> -- >> Regards, >> Jay Freedman >> Microsoft Word MVP FAQ: http://word.mvps.org >> Email cannot be acknowledged; please post all follow-ups to the newsgroup >> so all may benefit. >>
From: mokshadavid on 28 Jun 2008 22:03
Thanks Doug, your comment got me focused on that EnterKey() macro, and I whittled things down from there. Ok, would someone please help me test this? I think this is the solution I've been looking for, but before I ~announce~ it, I would like to know if it works. My goal: To disable the enter key in a Microsoft Word 2002 table form so that nothing happens when the user hits the enter key, and they have to navigate by mouse and TAB key. This is so the form does not get changed. This is also to retain numerical formatting in my cells that calculate on field exit. I didn't not want the Enter key to act like a TAB. Here is what I put in my VBA code: Sub EnterKeyMacro() If KeyAscii = 13 Then cmdOk.Enabled = False End If End Sub It works for me! I have a protected document template form that opens up protected, and the user form that is generated from the template also still opens up protected. The best part is that the ENTER key is disabled. The only downside I see is that I would have to disable the MACRO to update the template form (in some ways), because the ENTER key is disabled for the form, original template and copies. Thanks - mokshadavid "Doug Robbins - Word MVP" wrote: > Replace the macro in the KnowledgeBase Article with: > > Sub EnterKeyMacro() > ' Check whether the document is protected for forms > If ActiveDocument.ProtectionType <> wdAllowOnlyFormFields > 'The document is not protected for forms, > ' insert a carriage return. > Selection.TypeText Chr(13) > End If > End Sub > > -- > Hope this helps. > > Please reply to the newsgroup unless you wish to avail yourself of my > services on a paid consulting basis. > > Doug Robbins - Word MVP |