Login Required


Profile Shape

Please login first to continue.

Don't have an account? Register

Delete Every Content That Begins with .... and Ends with ...

Delete Every Content That Begins with .... and Ends with ...

Delete all content segments that start and end with specific phrases

๐Ÿงฝ Dynamic Text Deletion

In editing complex documents, you may sometimes need to remove repeated patterns of content that begin and end with specific words or characters—for example, to eliminate template placeholders, auto-generated notes, citation placeholders, or inline markup content.

Rather than manually searching for and deleting these segments (which is time-consuming and error-prone), this button offers an intelligent and dynamic solution to delete all content segments that start and end with specific phrases.


๐Ÿงฐ What This Button    Does

Clicking this button opens a UserForm titled Delete (Start … End) that allows you to enter two dynamic parameters:

  • ·     Start with (TextBox):

   o  Enter the starting phrase of the text range(s) you want to delete.

  • ·     End with (TextBox):

   o  Enter the ending phrase of the text range(s) you want to delete.

  • ·     Go (Button):

   o  Triggers the deletion process based on your input criteria.


๐Ÿง  How It Works

  • ·     Once you click Go, the add-in searches the entire document for all content chunks that begin with the specified “Start with” text and end with the “End with” text, and:
  • ·     ๐Ÿ—‘๏ธ Deletes them completely (including the starting and ending phrases themselves).
  • ·     ๐Ÿ”„ Repeats this process for all such occurrences throughout the entire document.

๐Ÿ“ฉ Output Messages

  • ·     Depending on the result, the add-in displays one of the following:
  • ·     โœ… If matches were found and deleted:

    X matching part(s) deleted successfully.
(where X is the number of deleted segments)

  • ·     โŒ If no matches were found:

    No matching part found.

  • ·     โ›” If either of text boxes are empty:

    Please fill this field.


๐Ÿ“ Example Use Cases

Scenario

Start With

End With

Result

Remove in-text code

[[[

]]]

Deletes all triple-bracketed code notes

Remove system tags

<sys>

</sys>

Deletes all system tag content

Remove draft comments

<!--

-->

Deletes all draft comments in HTML-style

 


โš ๏ธ Important Notes

  • ·     The search is case-sensitive by default.
  • ·     This works across multiple paragraphs, not just within one line.
  • ·     Partial overlaps will not be processed (only full matches from start to end).
  • ·     If you enter empty values in either box, it will not run the deletion.
  • ·     If multiple matches exist, all of them will be deleted at once.

โœจ Why This Button Is Useful

  • ·     ๐Ÿš€ Bulk deletion of template or unwanted content without manual effort
  • ·     ๐Ÿ” Eliminates the need to use Word's advanced wildcards or regex
  • ·     ๐Ÿ’ฏ Ensures no partial deletions or skipped matches
  • ·     ๐Ÿงผ Keeps your document clean and free of unintended blocks or technical content