Quote:
Originally Posted by gmaxey
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.