Graham,
Things are slow. So just providing this as another example of the CC BeforeStoreUpdate Event. It takes a bit of work to setup but eliminates the need to exit the CC after making the selection.
Create three Paragraph1 CCs with the same text. Tag 1 "Paragraph1", Tag 2 "Paragraph1_Norm" and Tag 3 "Paragraph1_ST" Then set the font in "Paragraph1_ST" as strikethrouh.
Now map the Topic_1 and three associated Paragraph1 CCs to a CXMLPart (see image).
After that you can delete the "Paragraph1_Norm" and "Paragraph1_ST" CCs from the document.
Here is the needed code:
Code:
Private Sub Document_ContentControlBeforeStoreUpdate(ByVal CC As ContentControl, Content As String)
Dim oNode As CustomXMLNode, oNodeC As CustomXMLNode
Select Case CC.Title
Case Is = "Topic 1"
Set oNode = CC.XMLMapping.CustomXMLPart.SelectSingleNode("/ns0:CC_Map_Root[1]/ns0:Paragraph1[1]")
If Content = "Does Not Apply" Then
Set oNodeC = CC.XMLMapping.CustomXMLPart.SelectSingleNode("/ns0:CC_Map_Root[1]/ns0:Paragraph1_ST[1]")
Else
Set oNodeC = CC.XMLMapping.CustomXMLPart.SelectSingleNode("/ns0:CC_Map_Root[1]/ns0:Paragraph1_Norm[1]")
End If
oNode.Text = oNodeC.Text
End Select
lbl_Exit:
Exit Sub
End Sub
BREAK
Paul, downloaded the document from your link and nothing happens when I change the FF DDL. I may be missing something.