Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
MS Word Drop-Down list linked to outside source?
I was wondering if it is possible to link a word drop down list to an outside
source such as an Excel list or and Access table. My Scenario: I have created 70+ locked templates that use some similiar drop down lists. These lists include Judges, Lawyers, and Arbitrators names that can change monthly. So i was looking for a better solution than me editing every drop down list on each template. I would like to be able to link a drop down list to say an MS Access table and so i can just edit the table and each drop down would just pull the info from that. Is this possible to do or is there a better solution? TIA Ed |
#2
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
MS Word Drop-Down list linked to outside source?
What sort of dropdown list in what Word version?
If you mean formfield dropdown lists, then subject to the proviso that such lists can only hold 25 entries, then it is relatively simple to populate the list(s) from an external table with a macro. In the following example the macro uses the first column of a Word table to populate a dropdown field called Dropdown1. You can use the same table to populate a variety of named dropdown fields and it is not too much of a stretch to import the data from an Excel or Access table. If all the templates use the same named dropdown fields the same macro can be used to populate each of them as required. http://www.gmayor.com/installing_macro.htm Dim oItem As Range Dim iRows As Long Dim RefDoc As Document Dim ChangeDoc As Document Dim oDD As DropDown Set RefDoc = ActiveDocument Set oDD = RefDoc.FormFields("Dropdown1").DropDown sfName = "D:\My Documents\Test\Judges.docx" 'Clear previous list oDD.ListEntries.Clear 'Repopulate list based on user selection Set ChangeDoc = Documents.Open(sfName) Set cTable = ChangeDoc.Tables(1) RefDoc.Activate iRows = cTable.Rows.Count If iRows 25 Then iRows = 25 For i = 1 To iRows Set oItem = cTable.Cell(i, 1).Range oItem.End = oItem.End - 1 If oItem.Text = "" Then Exit For oDD.ListEntries.Add oItem.Text Next i ChangeDoc.Close wdDoNotSaveChanges I think that in practice - and especially for longer lists - I would create a userform to select the data, and populate the form with docvariable fields For the basics, see Word MVP FAQ - Userforms http://word.mvps.org/FAQs/Userforms.htm for a more in depth explanation, see http://gregmaxey.mvps.org/Create_and...a_UserForm.htm -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org "Yotafan" wrote in message ... I was wondering if it is possible to link a word drop down list to an outside source such as an Excel list or and Access table. My Scenario: I have created 70+ locked templates that use some similiar drop down lists. These lists include Judges, Lawyers, and Arbitrators names that can change monthly. So i was looking for a better solution than me editing every drop down list on each template. I would like to be able to link a drop down list to say an MS Access table and so i can just edit the table and each drop down would just pull the info from that. Is this possible to do or is there a better solution? TIA Ed |
#3
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
MS Word Drop-Down list linked to outside source?
See the article "How to create a Userform" at:
http://word.mvps.org/FAQs/Userforms/CreateAUserForm.htm and the following pages of fellow MVP Greg Maxey's website : http://gregmaxey.mvps.org/Create_and...a_UserForm.htm http://gregmaxey.mvps.org/Populate_UserForm_ListBox.htm -- Hope this helps, Doug Robbins - Word MVP Please reply only to the newsgroups unless you wish to obtain my services on a paid professional basis. "Yotafan" wrote in message ... I was wondering if it is possible to link a word drop down list to an outside source such as an Excel list or and Access table. My Scenario: I have created 70+ locked templates that use some similiar drop down lists. These lists include Judges, Lawyers, and Arbitrators names that can change monthly. So i was looking for a better solution than me editing every drop down list on each template. I would like to be able to link a drop down list to say an MS Access table and so i can just edit the table and each drop down would just pull the info from that. Is this possible to do or is there a better solution? TIA Ed |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Drop List Options Dependent On Another Drop Down List Option | Microsoft Word Help | |||
Linked to a data source | Microsoft Word Help | |||
No way to return to source doc when linked at client's site | Microsoft Word Help | |||
Drop down list from another drop down list in Word? | Microsoft Word Help | |||
Drop-down List where items in drop-down list hyperlink to a webpage? | New Users |