Unique identifier for a paragraph in MS Word 2007

I write large MS Word 2007 documents that change frequently. I have to indicate paragraphs with stationary unique numbers that will not change when documents are changed. The numbers must be unique and will not change even if previous numbers are deleted. The order of the list is optional, and adding a new number to existing numbers is possible (for example: sequence 1, 4, 3 means that items 1-3 were written, then # 2 was deleted, then No. 5 was added. # 3 did not affect subsequent editing)

The mechanism should be internal to the document, since I work on the line and off the line. Numbers are assigned to each document individually.

Since I do not know how to program in MS Word, I would be grateful that you received a complete solution.

+4
source share
2 answers

No, this is impossible out of the box. Word does not assign a constant index to paragraphs. The easiest way, but it’s not so simple, to do this is to programmatically assign the index number of each element of the paragraph range to the CustomXML control that wraps the paragraph when it loads or whenever you run it. For this or any other solution, you need to study the Word object model and program it through VBA or VSTO or OpenXML.

+2
source

You can wrap a paragraph in a content control (structured document tag); they can have identifiers.

Iirc, Word 2010 allows paragraphs to have identifiers. M $ added this because they needed it for the parallel editing introduced in 2010.

+2
source

Source: https://habr.com/ru/post/1305975/


All Articles