#1
|
|||
|
|||
Macro to autoformat Numbered Headings
Hello,
I have a macro that finds sentences with keywords and lists the paragraph or section heading that they are under, for example, the macro currently retrieves shall statements and if the document were structured as below: Section 3.3.1 The contractor shall do this Would ideally return the 3.3.1 as well as the sentence containing the shall statement. However, I have encountered issues with documents that have headers and sections numbered manually. This mostly occurs when converting a .pdf document to .doc. I have looked at two versions of the same document, one .doc one .pdf and the formatting on numbered sections is completely lost with.pdf conversion. I am looking for a macro that will find all the "hand jammed" section numbers and reformat them so that they will work with my other macro. V/r, Logan Valentine |
#2
|
||||
|
||||
What you ask is impossible without access to the converted document and an original document with the correct numbered formatting.
In a document with autonumbering, the numbering is probably applied by a multilevel list in conjunction with formatted heading styles (though the numbers could be formatted using fields). When you convert the document to PDF, it becomes a graphical representation of that document - essentially a print-out. Such a PDF document does not have auto-numbered styles. When converted to Word a PDF is but a weak facsimile of the original document and the sutonumbering replaced by plain text, as you have discovered. At the very least the numbering must be complete, and the heading styles from the intended document or its template must be added to the converted document. Then you can search for the number sequences in order i.e. starting with Heading 1, remove the numbered text - in your example Section 3.3.1 - and apply the appropriate numbered style, which would replace that with the appropriate auto-number according to the style. The scope for error is huge.
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Capturing numbered headings | jbvalen | Word VBA | 5 | 05-04-2017 05:03 PM |
Numbered headings not working as expected after customising headings | seanspotatobusiness | Word | 5 | 03-03-2017 04:44 AM |
Word Mixing Numbered Headings with Numbered List | Tess0 | Word | 11 | 07-15-2014 05:25 AM |
Autoformat postformatting levelled headings | bolpom | Word | 4 | 03-18-2011 12:52 AM |
numbered headings | Caroline | Word | 5 | 03-14-2011 09:09 AM |