JenC said:
I am developing a template and have inserted several content controls.
However, they all look the same.
Is there a way to tell what kind of content control I've added (e.g.,
rich text vs. plain text)? And is there a way to change from one type
to another? I'm thinking of MS Access, where you have the ability to
change a control to another type.
Thanks,
Jen
Hi Jen,
They don't really *all* look the same. The rich text and plain text ones
look identical to each other, and the list box and combo box look the same
as each other. But yes, it is hard to tell at a glance.
One way to find what kind a particular text control is: Click inside it,
then click the Properties button in the Controls group. The label of the
third section of the dialog says either "Plain Text Properties" or "Rich
Text Properties". Unfortunately, even that doesn't work to tell a list box
from a combo box, since their Properties dialogs look the same, too. The
only practical difference is that you can type into a combo box but not into
a list box.
VBA knows, though. You can put this macro in a global template and add a
button for it to the Quick Access Toolbar.
Sub ShowCCType()
Dim CCs As ContentControls
Dim strType As String
Set CCs = Selection.Paragraphs(1).Range.ContentControls
If CCs.Count > 0 Then
Select Case CCs(1).Type
Case wdContentControlRichText
strType = "Rich Text"
Case wdContentControlText
strType = "Plain Text"
Case wdContentControlPicture
strType = "Picture"
Case wdContentControlComboBox
strType = "Combo Box"
Case wdContentControlDropdownList
strType = "Dropdown List"
Case wdContentControlDate
strType = "Date Picker"
Case wdContentControlBuildingBlockGallery
strType = "Building Block Gallery"
Case Else
strType = "other"
End Select
MsgBox "This is a " & strType & " content control."
End If
End Sub
--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.