Each document is going to have different page numbers where each section starts. It is not possible to utilize the word TOC, all the documents are already made. "
This is simply not accurate.
As a test, I just now
removed the Table of Contents from 61 documents in a folder. Saved them. The ToC are gone. The documents are "already made"....but now do not have a ToC. The section breaks, page numbering, is different between documents.
Next, I ran code to process
all 61 documents, generating new ToC for all of them.
Time to process all 61 documents: 1m 34s
Badda bing, badda boom.
If you do not want to use a
native feature and functionality that will make your documentation better, that is certainly your choice.
I just wish to point out: "Each document is going to have different page numbers where each section starts. "
With a generated ToC, this is absolutely, and totally, irrelevant. That is the point of a generated ToC, that it generates the correct ToC
regardless of what the page number is.
If you insist on doing it the hard way: "is there any way to get the page number info using like a FIND or something else "
The answer is a qualified yes. However, the problem is - as I have already stated - getting the logic tight. It will not be horribly difficult, but it certainly would not be trivial.
search for your text (REGULATIONS, etc.) (not hard)
find the page number (not hard)
....now what?
How do you get THAT page number to replace the XX for REGULATION...and not the XX for DESIGNS? How do you get that page number
back to the REGULATIONS manually typed into the "table of contents"?
I can think of a few possible routes, but ALL of them are ugly, and prone to errors.
Which is why professional document writers use generated ToC. You never have to think about getting the page numbers. If you add something to the document that may change the numbers, you simply right click the ToC...and select Update.
Done.
Good luck.
faq219-2884
Gerry
My paintings and sculpture