This guide is here to help you set up and use a Google Docs Script for numbering paragraphs in your documents for patents. It’s simple to use, looks great, and saves you time when working with paragraphs in patent documents or other structured writing.
When you’re working on documents like patents, keeping paragraphs numbered properly can be a pain. This script makes it easy by:
- Adding a "Paragraph Tools" menu to your Google Doc.
- Letting you quickly number paragraphs that follow a specific format.
Here’s how it works:
-
Custom Toolbar Menu
- A new menu called "Paragraph Tools" appears at the top of your Google Doc.
- From this menu, you can choose "Auto Number Paragraphs" to start numbering.
-
Smart Paragraph Scanning
- The script looks for paragraphs that:
- Are normal text (not headings or titles).
- Start with a number inside square brackets, like
[0001].
- The script looks for paragraphs that:
-
Automatic Formatting
- It renumbers paragraphs neatly and makes sure everything looks clean and consistent.
-
Click Deploy > Test Deployments in the Apps Script editor.
-
Select Deploy as add on and confirm the permissions.
-
Go back to your Google Doc and refresh the page.
-
You’ll see a new "Paragraph Tools" menu at the top of the document.
- Format your paragraphs to start with numbers in square brackets, like
[0001].
-
Click on Paragraph Tools in the toolbar.
-
Choose "Auto Number Paragraphs".
-
The script will update your document and neatly renumber your paragraphs!
- It Only Works with Normal Paragraphs: Headings and other styles aren’t affected.
- Resetting Numbers: If you need to restart numbering, just clear the existing ones and run the tool again.



