in Word 2007 I would like to be able to reset a dropdownlist to the placeholder text using vba. Is this possible? I guess I would like ShowingPlaceholderText to be read/write instead of read only.
I believe you simply select it from the list of dropdown items: Sub ScratchMaco() Dim oCC As ContentControl Set oCC = ActiveDocument.ContentControls(1) oCC.DropdownListEntries(1).Select 'Where the first ListEntry is the placeholdertext End Sub KWarner wrote: > in Word 2007 > I would like to be able to reset a dropdownlist to the placeholder > text using vba. Is this possible? I guess I would like > ShowingPlaceholderText to be read/write instead of read only. -- Greg Maxey - Word MVP My web site http://gregmaxey.mvps.org Word MVP web site http://word.mvps.org McCain/Palin '08 !!!
I don't want the placeholdertext to be one of the items to be selected, and I want it to be the grayed out style like the placeholdertext. "Greg Maxey" wrote: > I believe you simply select it from the list of dropdown items: > > Sub ScratchMaco() > Dim oCC As ContentControl > Set oCC = ActiveDocument.ContentControls(1) > oCC.DropdownListEntries(1).Select 'Where the first ListEntry is the > placeholdertext > End Sub > > > KWarner wrote: > > in Word 2007 > > I would like to be able to reset a dropdownlist to the placeholder > > text using vba. Is this possible? I guess I would like > > ShowingPlaceholderText to be read/write instead of read only. > > -- > Greg Maxey - Word MVP > > My web site http://gregmaxey.mvps.org > Word MVP web site http://word.mvps.org > > McCain/Palin '08 !!! > > >
for anyone who may be interested in how I solved this: Dim cc As ContentControl For Each cc In MainDoc.ContentControls If cc.Type = wdContentControlDropdownList Then cc.Type = wdContentControlComboBox cc.Range = "" cc.Type = wdContentControlDropdownList End If Next "KWarner" wrote: > in Word 2007 > I would like to be able to reset a dropdownlist to the placeholder text > using vba. Is this possible? I guess I would like ShowingPlaceholderText to > be read/write instead of read only.