View Single Post
 
Old 02-25-2014, 06:59 PM
gmaxey gmaxey is offline Windows 7 32bit 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

Content controls and ActiveX controls lists can be populated using an array. The following code populates the a selected cc dropdown list:

Code:
Sub ScratchMacro()
'A basic Word macro coded by Greg Maxey
Dim arrItems() As String
Dim lngIndex As Long
arrItems = Split("Item1|Item2|Item3", "|")
For lngIndex = 0 To UBound(arrItems)
  Selection.Range.ContentControls(1).DropdownListEntries.Add arrItems(lngIndex), arrItems(lngIndex)
Next lngIndex
End Sub
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote