Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
EDIT FORM FIELD OPTION
I have a document with a drop down form field. One of the options has a typo
I'd like to change, but I can't seem to do it in the Drop Down Form Field Options dialog box. The item is one of those very long webpage addresses so I'd like to find an easy way to change one character in the address. Can this be done? -- William |
#2
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
EDIT FORM FIELD OPTION
You will have to delete the incorrect item from the form field properties
(with the form unlocked) and then add it back again. or You could use the following macros. Make a note of the dropdown form field name. The first should be run with the form containing the field to be edited opened as the active document. A second document is created containing the entries from the dropdown field. Edit that document to correct the typo. Then with that document on screen as the active document, run the second macro. (It will work with Word 2007 docx also and can be run while the document is protected for forms). Sub Macro1() Dim oField As FormField Dim oDoc As Document Dim oDatadoc As Document Dim sName As String sName = InputBox("Enter dropdown field name") Set oDoc = ActiveDocument Set oDatadoc = Documents.Add Set oField = oDoc.FormFields(sName) For i = 1 To oField.DropDown.ListEntries.Count oDatadoc.Range.InsertAfter oField.DropDown.ListEntries(i).name & vbCr Next i oDatadoc.Variables("varFormName").Value = oDoc.FullName oDatadoc.Variables("varFieldName").Value = sName End Sub Sub Macro2() Dim oField As FormField Dim oDoc As Document Dim oDatadoc As Document Dim sFName As String Dim sName As String Dim oRng As Range Set oDatadoc = ActiveDocument sFName = oDatadoc.Variables("varFormName").Value sName = oDatadoc.Variables("varFieldName").Value Set oDoc = Documents.Open(sFName) Set oField = oDoc.FormFields(sName) oField.DropDown.ListEntries.Clear For i = 1 To oDatadoc.Paragraphs.Count - 1 Set oRng = oDatadoc.Paragraphs(i).Range oRng.End = oRng.End - 1 oField.DropDown.ListEntries.Add oRng, i Next i End Sub http://www.gmayor.com/installing_macro.htm -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org "William" wrote in message ... I have a document with a drop down form field. One of the options has a typo I'd like to change, but I can't seem to do it in the Drop Down Form Field Options dialog box. The item is one of those very long webpage addresses so I'd like to find an easy way to change one character in the address. Can this be done? -- William |
#3
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
EDIT FORM FIELD OPTION
William wrote:
I have a document with a drop down form field. One of the options has a typo I'd like to change, but I can't seem to do it in the Drop Down Form Field Options dialog box. The item is one of those very long webpage addresses so I'd like to find an easy way to change one character in the address. Can this be done? It can be done, but not very easily. The only method of correcting dropdown entries is to delete the existing one and then insert the edited one. The difficult part is getting a copy of the existing entry so you can edit it. Here are the steps: - Uprotect the form. - Double-click the dropdown field to open its Properties dialog, and copy the content of the Bookmark box. In the dropdown list, click once on the entry to be edited. Close the Properties dialog. - Somewhere else in the form, press Ctrl+F9 to insert a pair of field braces. Paste the bookmark name between the braces, and press F9 to update the field. It should show the entry to be edited. - Click on the field you just updated, and press Ctrl+Shift+F9 to unlink the field -- that turns it into plain text. - Make the editing change you need, and cut the resulting text to the clipboard. - Reopen the Properties dialog. Remove the incorrect entry, paste the correct entry into the Add box, and use the up/down arrows to adjust the order if necessary. -- 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. |
#4
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
EDIT FORM FIELD OPTION
Please ignore all this blather. There is a much simpler solution.
- Open the dropdown's Properties dialog. - Select the incorrect entry. - Click the Remove button. The entry that has been removed from the list now appears in the box to the left. - Change the character as needed. - Click the Add button. Adjust the order of entries if necessary. -- 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. Jay Freedman wrote: William wrote: I have a document with a drop down form field. One of the options has a typo I'd like to change, but I can't seem to do it in the Drop Down Form Field Options dialog box. The item is one of those very long webpage addresses so I'd like to find an easy way to change one character in the address. Can this be done? It can be done, but not very easily. The only method of correcting dropdown entries is to delete the existing one and then insert the edited one. The difficult part is getting a copy of the existing entry so you can edit it. Here are the steps: - Uprotect the form. - Double-click the dropdown field to open its Properties dialog, and copy the content of the Bookmark box. In the dropdown list, click once on the entry to be edited. Close the Properties dialog. - Somewhere else in the form, press Ctrl+F9 to insert a pair of field braces. Paste the bookmark name between the braces, and press F9 to update the field. It should show the entry to be edited. - Click on the field you just updated, and press Ctrl+Shift+F9 to unlink the field -- that turns it into plain text. - Make the editing change you need, and cut the resulting text to the clipboard. - Reopen the Properties dialog. Remove the incorrect entry, paste the correct entry into the Add box, and use the up/down arrows to adjust the order if necessary. |
#5
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
EDIT FORM FIELD OPTION
Yea! Great and simple solution. Thanks.
-- William "Jay Freedman" wrote: Please ignore all this blather. There is a much simpler solution. - Open the dropdown's Properties dialog. - Select the incorrect entry. - Click the Remove button. The entry that has been removed from the list now appears in the box to the left. - Change the character as needed. - Click the Add button. Adjust the order of entries if necessary. -- 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. Jay Freedman wrote: William wrote: I have a document with a drop down form field. One of the options has a typo I'd like to change, but I can't seem to do it in the Drop Down Form Field Options dialog box. The item is one of those very long webpage addresses so I'd like to find an easy way to change one character in the address. Can this be done? It can be done, but not very easily. The only method of correcting dropdown entries is to delete the existing one and then insert the edited one. The difficult part is getting a copy of the existing entry so you can edit it. Here are the steps: - Uprotect the form. - Double-click the dropdown field to open its Properties dialog, and copy the content of the Bookmark box. In the dropdown list, click once on the entry to be edited. Close the Properties dialog. - Somewhere else in the form, press Ctrl+F9 to insert a pair of field braces. Paste the bookmark name between the braces, and press F9 to update the field. It should show the entry to be edited. - Click on the field you just updated, and press Ctrl+Shift+F9 to unlink the field -- that turns it into plain text. - Make the editing change you need, and cut the resulting text to the clipboard. - Reopen the Properties dialog. Remove the incorrect entry, paste the correct entry into the Add box, and use the up/down arrows to adjust the order if necessary. . |
#6
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
EDIT FORM FIELD OPTION
Please ignore all this blather. There is a much simpler solution.
- Open the dropdown's Properties dialog. - Select the incorrect entry. - Click the Remove button. The entry that has been removed from the list now appears in the box to the left. - Change the character as needed. - Click the Add button. Adjust the order of entries if necessary. -- 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. Jay Freedman wrote: William wrote: I have a document with a drop down form field. One of the options has a typo I'd like to change, but I can't seem to do it in the Drop Down Form Field Options dialog box. The item is one of those very long webpage addresses so I'd like to find an easy way to change one character in the address. Can this be done? It can be done, but not very easily. The only method of correcting dropdown entries is to delete the existing one and then insert the edited one. The difficult part is getting a copy of the existing entry so you can edit it. Here are the steps: - Uprotect the form. - Double-click the dropdown field to open its Properties dialog, and copy the content of the Bookmark box. In the dropdown list, click once on the entry to be edited. Close the Properties dialog. - Somewhere else in the form, press Ctrl+F9 to insert a pair of field braces. Paste the bookmark name between the braces, and press F9 to update the field. It should show the entry to be edited. - Click on the field you just updated, and press Ctrl+Shift+F9 to unlink the field -- that turns it into plain text. - Make the editing change you need, and cut the resulting text to the clipboard. - Reopen the Properties dialog. Remove the incorrect entry, paste the correct entry into the Add box, and use the up/down arrows to adjust the order if necessary. |
#7
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
EDIT FORM FIELD OPTION
You will have to delete the incorrect item from the form field properties
(with the form unlocked) and then add it back again. or You could use the following macros. Make a note of the dropdown form field name. The first should be run with the form containing the field to be edited opened as the active document. A second document is created containing the entries from the dropdown field. Edit that document to correct the typo. Then with that document on screen as the active document, run the second macro. (It will work with Word 2007 docx also and can be run while the document is protected for forms). Sub Macro1() Dim oField As FormField Dim oDoc As Document Dim oDatadoc As Document Dim sName As String sName = InputBox("Enter dropdown field name") Set oDoc = ActiveDocument Set oDatadoc = Documents.Add Set oField = oDoc.FormFields(sName) For i = 1 To oField.DropDown.ListEntries.Count oDatadoc.Range.InsertAfter oField.DropDown.ListEntries(i).name & vbCr Next i oDatadoc.Variables("varFormName").Value = oDoc.FullName oDatadoc.Variables("varFieldName").Value = sName End Sub Sub Macro2() Dim oField As FormField Dim oDoc As Document Dim oDatadoc As Document Dim sFName As String Dim sName As String Dim oRng As Range Set oDatadoc = ActiveDocument sFName = oDatadoc.Variables("varFormName").Value sName = oDatadoc.Variables("varFieldName").Value Set oDoc = Documents.Open(sFName) Set oField = oDoc.FormFields(sName) oField.DropDown.ListEntries.Clear For i = 1 To oDatadoc.Paragraphs.Count - 1 Set oRng = oDatadoc.Paragraphs(i).Range oRng.End = oRng.End - 1 oField.DropDown.ListEntries.Add oRng, i Next i End Sub http://www.gmayor.com/installing_macro.htm -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org "William" wrote in message ... I have a document with a drop down form field. One of the options has a typo I'd like to change, but I can't seem to do it in the Drop Down Form Field Options dialog box. The item is one of those very long webpage addresses so I'd like to find an easy way to change one character in the address. Can this be done? -- William |
#8
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
EDIT FORM FIELD OPTION
William wrote:
I have a document with a drop down form field. One of the options has a typo I'd like to change, but I can't seem to do it in the Drop Down Form Field Options dialog box. The item is one of those very long webpage addresses so I'd like to find an easy way to change one character in the address. Can this be done? It can be done, but not very easily. The only method of correcting dropdown entries is to delete the existing one and then insert the edited one. The difficult part is getting a copy of the existing entry so you can edit it. Here are the steps: - Uprotect the form. - Double-click the dropdown field to open its Properties dialog, and copy the content of the Bookmark box. In the dropdown list, click once on the entry to be edited. Close the Properties dialog. - Somewhere else in the form, press Ctrl+F9 to insert a pair of field braces. Paste the bookmark name between the braces, and press F9 to update the field. It should show the entry to be edited. - Click on the field you just updated, and press Ctrl+Shift+F9 to unlink the field -- that turns it into plain text. - Make the editing change you need, and cut the resulting text to the clipboard. - Reopen the Properties dialog. Remove the incorrect entry, paste the correct entry into the Add box, and use the up/down arrows to adjust the order if necessary. -- 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. |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Where is the check box form field option in '07? | Microsoft Word Help | |||
Edit Text Form Field | Microsoft Word Help | |||
How to edit text in the middle of a form field? | New Users | |||
Calculated Form Field Option that sum other form fields | Microsoft Word Help | |||
Add an option to require data entry for a form field | Microsoft Word Help |