Hello,
I found some VBA similar to the following to create a dependent control. I pick a name from a combo box and the appropriate signature block is displayed. It works fine but you need to exit the content control before the code executes. Is there another event or a trick so that I can pick the value from the combo box and see "live updates" without exiting the control?
Thanks in advance,
Mark
Private Sub Document_ContentControlOnExit(ByVal CC As ContentControl, Cancel As Boolean)
Dim oCC As ContentControl
Dim oTmp As Template
Select Case CC.Title
Case "Pick"
Set oCC = ActiveDocument.SelectContentControlsByTitle("Picked").Item(1)
Set oTmp = ActiveDocument.AttachedTemplate
oCC.LockContents = False
Select Case CC.Range.Text
Case "Bob"
oTmp.BuildingBlockTypes(wdTypeCustom1).Categories("Demo").BuildingBlocks("BobSign").Insert oCC.Range
Case "Steve"
oTmp.BuildingBlockTypes(wdTypeCustom1).Categories("Demo").BuildingBlocks("SteveSign").Insert oCC.Range
Case "Mary"
oTmp.BuildingBlockTypes(wdTypeCustom1).Categories("Demo").BuildingBlocks("MarySign").Insert oCC.Range
End Select
oCC.LockContents = True
End Select
End Sub