Word 2007: Change font & colour of CC placeholder text using VBA?

A

Ailish

Hi,

Is it possible to use VBA to assign a font and colour to contentcontrol
placeholder text that is different to the default font and colour?

I want to use it in conjunction with the code below which restores
placeholder text that had previously been removed to provide a "cleaner"
print-out of a document where not all contentcontrols had been used. It's
just that my original placeholder text was a paler grey and smaller font.

Thanks,
Ailish

For Each cc In ActiveDocument.ContentControls

If InStr(cc.Tag, "txt") And cc.ShowingPlaceholderText Then
cc.SetPlaceholderText , , "(T)"
ElseIf InStr(cc.Tag, "cmb") And cc.ShowingPlaceholderText Then
cc.SetPlaceholderText , , "(C)"
ElseIf InStr(cc.Tag, "DP") And cc.ShowingPlaceholderText Then
cc.SetPlaceholderText , , "(DP)"
ElseIf InStr(cc.Tag, "Drop") And cc.ShowingPlaceholderText Then
cc.SetPlaceholderText , , "(D)"
End If
 

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