Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 05-05-2020, 09:47 AM
Narcissus Narcissus is offline Populate Dependent Word Dropdown List from Excel Windows 10 Populate Dependent Word Dropdown List from Excel Office 2016
Novice
Populate Dependent Word Dropdown List from Excel
 
Join Date: May 2020
Posts: 1
Narcissus is on a distinguished road
Default 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
Reply With Quote
  #2  
Old 05-05-2020, 02:55 PM
macropod's Avatar
macropod macropod is offline Populate Dependent Word Dropdown List from Excel Windows 7 64bit Populate Dependent Word Dropdown List from Excel Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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]
Reply With Quote
Reply



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
Populate Dependent Word Dropdown List from Excel 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

Other Forums: Access Forums

All times are GMT -7. The time now is 03:32 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft