#1
|
|||
|
|||
Populate Dependent Word Dropdown List from Excel
As a fairly intuitive learner, and first time user of VB, I'm needing assistance using your macro posted here. I am needing exactly what is shown at the following URL under "Conditional Content Control Dropdown List w\Dependent Fields"
Import Excel List into Word Dropdown List Goal: I need a dropdown list (via CC dropdown list) containing what appears in Column A of an Excel sheet. [I have successfully done this in my Word document. The following is where I need assistance]. Once an item is selected, I would like the data from Columns B through E to auto-populate below. I have an Excel spreadsheet that has several columns of standard contact information, i.e. Name, Address, Phone, Fax, Email. Context: I have a single page Word document that gets forwarded to about 200 different people. At the bottom of that page, I need to select who I am sending it to (hence the needed dropdown list). For example, I am sending the document to John Maplebar. Once I select "John Maplebar" from the CC dropdown list, I need the related data from Columns B through E to concatenate below that person's name. There may be missing entries, for example, nothing in Column D as they may not have a fax (in case this matters). In the end, after selecting his name, my Word document should display: John Maplebar 123 Main St Seattle, WA 98111 206-555-1212 johnmaplebar@mail.com Issue: As a new VB guy, I can't decipher which pieces of code I need from the various examples I've found to make this work how I need. The closest I've seen is from the demo pack downloaded from the URL above (https://gregmaxey.com/word_tip_resou..._demo_pack.zip), which contains several examples in the VB code, making it hard for me to figure out exactly how to code what I need for my purposes (the closest being the last example in the Word document provided in that demo pack I linked). Any help is greatly appreciated! EDIT I got it up and going! However, In my 7th column in my spreadsheet (Column 'G') I would like to use it to add extra notes about the particular contact (long notes), however VB then advises "String parameter too long." Using (primarily) the code on the first page, is there a way to limit the data it's taking from the spreadsheet to stop at column F so that it ignores G that contains these long notes? Last edited by macropod; 05-05-2020 at 02:49 PM. Reason: Split from: https://www.msofficeforums.com/word-vba/16330-how-import-list-excel-into-drop-down.html |
#2
|
||||
|
||||
See: https://www.msofficeforums.com/word-...tml#post119230. This was referenced in post #17 of the thread you posted in.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Importing content control data from excel and populate two fields on selected dropdown | badarlodhi | Word VBA | 8 | 02-08-2023 10:47 AM |
Auto populate a text field based on Content Control Dropdown List | matthias92701 | Word VBA | 2 | 05-02-2019 03:54 PM |
Auto populate form (data from excel) in Word based on drop down list selection (data from excel) | wvlls | Word VBA | 1 | 03-22-2019 02:29 PM |
Populate Word Drop-down list with Excel column then auto fill form fields with Excel data | Faldinio | Word VBA | 7 | 10-19-2014 06:03 AM |
Populate dropdown list with data from Access table | spw4000 | Office | 0 | 02-24-2012 05:22 AM |