I need to determine if any new ContentControls were inserted into a Word 2010 (docx) document after a paste so that I can create a new XML node to which I can map them.
The way I see it, there are two challenges:
- How do I capture the paste event? (I've seen suggestions to detect a button combination, or toolbar press, etc.)
- What is the best way to check the pasted content for controls? (Should I check the clipboard, a range in the document, etc.)
Once I have a collection of the new ContentControls, I already have functions that can check for prior existence, and create new mappings if the ContentControls are new. I just need to be able to detect the presence of a new ContentControl when it is inserted.
****UPDATE****
I have not been able to successfully check the clipboard contents for ContentControls. I cannot enumerate throught the clipboard data to find the controls.