Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
Francis Cunningham, Jr. Francis Cunningham, Jr. is offline
external usenet poster
 
Posts: 7
Default Using Drop Down box that can be edited

Hi,
I have created a form in Word 2007, but would like to have the drop down box
I created to also be overwritten by the user if the items in the drop box
doesn't include their choice. Thanks
fjcunninghamjr
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Using Drop Down box that can be edited

One possibility would be to replace one of the items in the list with a user
input item. You could do this with a macro run on exit from the dropdown
field

Assuming the dropdown field Dropdown1, put an item at the end of the
dropdown list "Enter your own value" then run the following macro on exit
from that field

Dim sChoice As String
Dim fDD As FormFields
Set fDD = ActiveDocument.FormFields
MsgBox fDD("Dropdown1").Result
If InStr(1, fDD("Dropdown1").Result, "Enter your own value") Then
sChoice = InputBox("Enter your own")
With fDD("Dropdown1").DropDown.ListEntries
.Item("Enter your own value").Delete
.Add sChoice
fDD("Dropdown1").Result = sChoice
End With
End If

This replaces the "Enter your own value" item with the input value and sets
that as the result.
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



"Francis Cunningham, Jr."
wrote in message ...
Hi,
I have created a form in Word 2007, but would like to have the drop down
box
I created to also be overwritten by the user if the items in the drop box
doesn't include their choice. Thanks
fjcunninghamjr



  #3   Report Post  
Posted to microsoft.public.word.docmanagement
Jay Freedman Jay Freedman is offline
external usenet poster
 
Posts: 9,854
Default Using Drop Down box that can be edited

Two more possibilities:

- Use a Combo Box from the Control Toolbox (Word 2003 and before) or from
the Legacy Tools gallery of the Developer ribbon (Word 2007 / 2010). It's
called a "combo box" because it's a combination of a dropdown list and an
edit box, and it's specifically intended for allowing either selection from
the list or manual entry. I don't usually recommend the Control Toolbox
objects, because of the concerns described in the "Appropriateness for the
Task" section of
http://msdn2.microsoft.com/en-us/lib...ffice.10).aspx, but if
you just need one combo box it should be OK.

- Create a Userform
(http://gregmaxey.mvps.org/Create_and...a_UserForm.htm) and put a combo
box on it. Store the result in a document variable and display it in the
document with a DocVariable 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.

Graham Mayor wrote:
One possibility would be to replace one of the items in the list with
a user input item. You could do this with a macro run on exit from
the dropdown field

Assuming the dropdown field Dropdown1, put an item at the end of the
dropdown list "Enter your own value" then run the following macro on
exit from that field

Dim sChoice As String
Dim fDD As FormFields
Set fDD = ActiveDocument.FormFields
MsgBox fDD("Dropdown1").Result
If InStr(1, fDD("Dropdown1").Result, "Enter your own value") Then
sChoice = InputBox("Enter your own")
With fDD("Dropdown1").DropDown.ListEntries
.Item("Enter your own value").Delete
.Add sChoice
fDD("Dropdown1").Result = sChoice
End With
End If

This replaces the "Enter your own value" item with the input value
and sets that as the result.
http://www.gmayor.com/installing_macro.htm

"Francis Cunningham, Jr."
wrote in message
...
Hi,
I have created a form in Word 2007, but would like to have the drop
down box
I created to also be overwritten by the user if the items in the
drop box doesn't include their choice. Thanks
fjcunninghamjr



  #4   Report Post  
Posted to microsoft.public.word.docmanagement
Jay Freedman Jay Freedman is offline
external usenet poster
 
Posts: 9,854
Default Using Drop Down box that can be edited


Two more possibilities:

- Use a Combo Box from the Control Toolbox (Word 2003 and before) or from
the Legacy Tools gallery of the Developer ribbon (Word 2007 / 2010). It's
called a "combo box" because it's a combination of a dropdown list and an
edit box, and it's specifically intended for allowing either selection from
the list or manual entry. I don't usually recommend the Control Toolbox
objects, because of the concerns described in the "Appropriateness for the
Task" section of
http://msdn2.microsoft.com/en-us/lib...ffice.10).aspx, but if
you just need one combo box it should be OK.

- Create a Userform
(http://gregmaxey.mvps.org/Create_and...a_UserForm.htm) and put a combo
box on it. Store the result in a document variable and display it in the
document with a DocVariable 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.

Graham Mayor wrote:
One possibility would be to replace one of the items in the list with
a user input item. You could do this with a macro run on exit from
the dropdown field

Assuming the dropdown field Dropdown1, put an item at the end of the
dropdown list "Enter your own value" then run the following macro on
exit from that field

Dim sChoice As String
Dim fDD As FormFields
Set fDD = ActiveDocument.FormFields
MsgBox fDD("Dropdown1").Result
If InStr(1, fDD("Dropdown1").Result, "Enter your own value") Then
sChoice = InputBox("Enter your own")
With fDD("Dropdown1").DropDown.ListEntries
.Item("Enter your own value").Delete
.Add sChoice
fDD("Dropdown1").Result = sChoice
End With
End If

This replaces the "Enter your own value" item with the input value
and sets that as the result.
http://www.gmayor.com/installing_macro.htm

"Francis Cunningham, Jr."
wrote in message
...
Hi,
I have created a form in Word 2007, but would like to have the drop
down box
I created to also be overwritten by the user if the items in the
drop box doesn't include their choice. Thanks
fjcunninghamjr



  #5   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Using Drop Down box that can be edited


One possibility would be to replace one of the items in the list with a user
input item. You could do this with a macro run on exit from the dropdown
field

Assuming the dropdown field Dropdown1, put an item at the end of the
dropdown list "Enter your own value" then run the following macro on exit
from that field

Dim sChoice As String
Dim fDD As FormFields
Set fDD = ActiveDocument.FormFields
MsgBox fDD("Dropdown1").Result
If InStr(1, fDD("Dropdown1").Result, "Enter your own value") Then
sChoice = InputBox("Enter your own")
With fDD("Dropdown1").DropDown.ListEntries
.Item("Enter your own value").Delete
.Add sChoice
fDD("Dropdown1").Result = sChoice
End With
End If

This replaces the "Enter your own value" item with the input value and sets
that as the result.
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



"Francis Cunningham, Jr."
wrote in message ...
Hi,
I have created a form in Word 2007, but would like to have the drop down
box
I created to also be overwritten by the user if the items in the drop box
doesn't include their choice. Thanks
fjcunninghamjr





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
keep an embedded object from being edited barry Microsoft Word Help 2 August 16th 08 03:19 PM
detect if word has been edited Terry[_3_] Microsoft Word Help 1 June 7th 07 02:27 AM
Edited documents changing Lamont Page Layout 1 October 11th 06 01:02 PM
How to create PDF file that can be edited. Trying To Excel Microsoft Word Help 1 August 31st 06 12:13 AM
Who last edited the file? Kamran Microsoft Word Help 4 June 9th 05 06:46 PM


All times are GMT +1. The time now is 02:11 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"