Delete all but first/last content control by name

Modified on Mon, 5 Oct at 1:53 PM

With BaseExtensions we are able to delete all content controls with a given name, while not deleting the first or last instance of this CC in the document. This can be handy to add as a postcommand to the Reuse-functionality.

CMDs

<Cmd case="BaseExtensions:delete-all-but-first-cc" Name="xx"/>

<Cmd case="BaseExtensions:delete-all-but-last-cc" Name="xx"/>

Parameters

Name

The name of the ContentControls to delete.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article