The document I’m working on has a number for each paragraph, and paragraphs will be moved frequently while editing. I’m looking for something I can put in the text instead of a number, which will start with the number 1 and count one higher each time it is placed. Something that basically does x = x + 1 throughout the document.
Numbered list???
Also, you could use a formula field for that.
Press Ctrl+F2 and set up a Number Range variable field as described at How can I have a custom numbered field?.
For each new paragraph, simply copy and paste the field to get x = x + 1. If paragraphs need to be moved, the fields will automatically renumber correctly.
I’m too new to upvote your comment, but thank you. It’s exactly what I was looking for.
If all your paragraphs have the same visual appearance (style), a numbered list is much simpler and has all the properties you need. If your paragraphs may have different styles but be numbered sequentially, field insertion (Jim K’s suggestion) is your only solution.
In both cases, unnumbered paragraphs are possible: with an other-than-numbered-list style or no field insertion.