Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
![]()
I added the KB macros to my form and it did work, except that the formatting
of the field was not carried out (i.e. with format set to MM/dd/yy, input 5/4 and field showed 5/4 instead of 05/04/06) when using the enter key. I found that by using the command SendKeys "{TAB}" the fields woud be formatted. Also, did not have to check if was last field to go first field. Here is the code. Sub EnterKeyMacro() ' Check whether the document is protected for forms ' and whether the protection is active. If ActiveDocument.ProtectionType = wdAllowOnlyFormFields And _ Selection.Sections(1).ProtectedForForms = True Then ' Go to the next form field if the current form field SendKeys "{TAB}" Else ' If the document is not protected for forms, ' insert a tab stop character. Selection.TypeText Chr(13) End If End Sub "Peter B" wrote: Is there a way to limit a form field to 1 line only so when the enter key is used to navigate round the form instead of the tab key another line is not added? I have some fields that cannot be limited to a set sum of characters, e.g names, and want to stop extra lines being added. |
Reply |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Blank return for drop-down form fields | Microsoft Word Help | |||
Form text fields are disappearing during a merge to new document. | Mailmerge | |||
Default text shown in form fields | Microsoft Word Help | |||
How do I use a form then mailmerge without losing the form fields | Mailmerge | |||
Having multiple form fields automatically updated | Microsoft Word Help |