Hawkansson
12-02-2016, 12:24 AM
Hi, following some guides by Greg Maxey and "Wordmeister" I've managed to detect when a new node is inserted or deleted by a mapped repeating section content Control.
What I would want to achieve, is that whenever a new row is inserted or deleted in table 1 (the repeating section cc), table 2 is updated accordingly, i.e if a row is added in table 1, one row is added in table 2.
But it seems the NodeAfterInsert event can't deal with selection changes or table manipulations. As an example the following could will work:
Private Sub cxp_NodeAfterInsert(ByVal NewNode As Office.CustomXMLNode,ByVal InUndoRedo As Boolean)
MsgBox "ping"
End Sub
... but this would not:
Private Sub cxp_NodeAfterInsert(ByVal NewNode As Office.CustomXMLNode, ByVal InUndoRedo As Boolean)
Selection.MoveDown
End Sub
The table with my repeated section cc gets totally messed up. My landscape page setup changes to portrait and I've also seen that Word becomes unresponsive.
Any suggestions or tips? Are there other ways of detecting that my table changes, and fire events on that?
Best regards, David
What I would want to achieve, is that whenever a new row is inserted or deleted in table 1 (the repeating section cc), table 2 is updated accordingly, i.e if a row is added in table 1, one row is added in table 2.
But it seems the NodeAfterInsert event can't deal with selection changes or table manipulations. As an example the following could will work:
Private Sub cxp_NodeAfterInsert(ByVal NewNode As Office.CustomXMLNode,ByVal InUndoRedo As Boolean)
MsgBox "ping"
End Sub
... but this would not:
Private Sub cxp_NodeAfterInsert(ByVal NewNode As Office.CustomXMLNode, ByVal InUndoRedo As Boolean)
Selection.MoveDown
End Sub
The table with my repeated section cc gets totally messed up. My landscape page setup changes to portrait and I've also seen that Word becomes unresponsive.
Any suggestions or tips? Are there other ways of detecting that my table changes, and fire events on that?
Best regards, David