#1   Report Post  
Posted to microsoft.public.word.docmanagement
William William is offline
external usenet poster
 
Posts: 83
Default 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   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default 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   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default 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



  #4   Report Post  
Posted to microsoft.public.word.docmanagement
Jay Freedman Jay Freedman is offline
external usenet poster
 
Posts: 9,854
Default 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.


  #5   Report Post  
Posted to microsoft.public.word.docmanagement
Jay Freedman Jay Freedman is offline
external usenet poster
 
Posts: 9,854
Default 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.




  #6   Report Post  
Posted to microsoft.public.word.docmanagement
Jay Freedman Jay Freedman is offline
external usenet poster
 
Posts: 9,854
Default 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   Report Post  
Posted to microsoft.public.word.docmanagement
Jay Freedman Jay Freedman is offline
external usenet poster
 
Posts: 9,854
Default 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.



  #8   Report Post  
Posted to microsoft.public.word.docmanagement
William William is offline
external usenet poster
 
Posts: 83
Default 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.



.

Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Where is the check box form field option in '07? sweet tooth 415 Microsoft Word Help 2 October 9th 09 11:19 PM
Edit Text Form Field Marlene Microsoft Word Help 1 December 19th 08 12:13 AM
How to edit text in the middle of a form field? Kara New Users 4 July 10th 06 03:48 PM
Calculated Form Field Option that sum other form fields DDTexan Microsoft Word Help 2 January 14th 06 06:28 AM
Add an option to require data entry for a form field Reedo Microsoft Word Help 0 November 29th 05 08:22 PM


All times are GMT +1. The time now is 01:48 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"