DropDownList ContentControl PlaceHolderText

K

KWarner

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.
 
G

Greg Maxey

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

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


McCain/Palin '08 !!!
 
K

KWarner

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.
 
K

KWarner

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top