Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Closed Thread
 
Thread Tools Display Modes
  #1  
Old 07-08-2016, 05:24 AM
gmaxey gmaxey is offline How to import list from Excel into drop-down list into word Windows 7 32bit How to import list from Excel into drop-down list into word Office 2010 (Version 14.0)
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,617
gmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nice
Default

If you are asking about:



Code:
Debug.Print Selection.Range.ContentControls(1).ID
'or
MsgBox Selection.Range.ContentControls(1).ID
You can run either from the VB Immediate window.
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
  #2  
Old 07-10-2016, 10:46 PM
celias celias is offline How to import list from Excel into drop-down list into word Windows 10 How to import list from Excel into drop-down list into word Office 2016
Novice
 
Join Date: Jul 2016
Posts: 5
celias is on a distinguished road
Default

Quote:
Originally Posted by gmaxey View Post
I you are asking about:

Code:
Debug.Print Selection.Range.ContentControls(1).ID
'or
MsgBox Selection.Range.ContentControls(1).ID
You can run either from the VB Immediate window.
Hi, @gmaxey,
I was asking about the very first code on this thread (I'm sorry if I didn't place my question correctly).

I have a word template file with just one dropdown list created. I named the dropdown list as "Clients" and it has no options entered yet. I wanted to fill it with a list of clients that I have on column A of Sheet1 on an Excel file called "Clients List".

I created a macro on Word called Dropdownlist and I pasted the suggested code there. I changed the location for the StrWkBkNm file.

When I run the macro I get the error message: "Run-time error '1004': Application-defined or object-defined error". The file does exist and column A of sheet1 has data from A1 down to A106...

Do you have a suggestion about how to fix this?
Would this have to do with something called "declarations" that I saw somewhere?

Thank you in advance for any tip.

Last edited by celias; 07-10-2016 at 11:12 PM. Reason: forgot to say something
Closed Thread

Tags
lesson plan template, teacher help



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to import list from Excel into drop-down list into word Dynamically changing drop-down list based on selection? (Word Form) laurarem Word 1 02-21-2013 10:17 PM
How to import list from Excel into drop-down list into word How to import a list of names into PowerPoint from Excel? CarpetRemnant PowerPoint 4 12-07-2012 11:08 AM
Drop down list, Can it be done??? garethreid Outlook 0 08-09-2012 06:08 AM
How to import list from Excel into drop-down list into word drop down list from external data source Excel 2007? Intruder Excel 1 08-03-2012 05:41 AM
Long List for drop down box DLo99 Word 0 02-28-2010 08:07 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 08:23 AM.


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