![]() |
|
|
|
#1
|
||||
|
||||
|
The important thing about what's in the link is that it demonstrates how you can use document variables. The method of getting the data into and out of it/them needn't necessarily be as complex as it was for that thread, where data from multiple workbooks and worksheets were being collated.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
#2
|
|||
|
|||
|
Hey macropod, I successfully found a way around the character limit by storing the excel columns as arrays.
However, in other parts of my document, I am still using value to fill in multiple fields from the dropdown. Which brings me to my question: In your first post in this thread, your code included the following: Code:
With xlWkBk
With .Worksheets(StrWkShtNm)
' Find the last-used row in column A.
LRow = .Cells(.Rows.Count, 1).End(xlUp).Row
' Populate the content control titled 'ID', with Column A for the 'ID' as the
' content control Text and the values from columns B-E as the content control
' value, using a "|" separator
ActiveDocument.SelectContentControlsByTitle("ID")(1).DropdownListEntries.Clear
For i = 1 To LRow
ActiveDocument.SelectContentControlsByTitle("ID")(1).DropdownListEntries.Add _
Text:=Trim(.Range("A" & i))
'or, for example, to add the contents of column B to the content control's 'value':
'ActiveDocument.SelectContentControlsByTitle("ID")(1).DropdownListEntries.Add _
Text:=Trim(.Range("A" & i)), Value:=Trim(.Range("B" & i))
Next
End With
.Close False
End With
Thanks |
|
| Tags |
| lesson plan template, teacher help |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Dynamically changing drop-down list based on selection? (Word Form)
|
laurarem | Word | 1 | 02-21-2013 10:17 PM |
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 |
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 |