View Single Post
 
Old 06-28-2011, 03:34 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,527
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Hi flds,

The code creates the tables, appendices, references & text output documents in that order. As it goes, tables in the source document (should) get deleted, then appendices (should) get deleted followed by references. If a problem occurs early in the chain, the effects will be seen further down. Hence, tables appearing where they shouldn't, etc.

Re blank pages in the tables document, that suggests your source document has manual page breaks as well as Section breaks. Please confirm. If so, I can modify the code to remove them. The code:
Code:
      'Delete all tables in the source document
      For Each Tbl In .Tables
        Tbl.Delete
      Next
should delete all tables from the source document once the tables document is created and before going on to the appendices document's creation. If any remain when the appendices & refernces documents are created, that suggests there are tables in textboxes or something such. Please confirm.

Re appendices document, the lack of output suggests the first word of the relevant Section is not 'Appendix'. The 'If UCase(Sctn.Range.Words.First) = "APPENDIX" Then' test captures any combination of upper/lower case, by converting everything to upper case and comparing on that basis.

Re references document, the inclusion of the appendices is due to whatever causes the appendices not to be extracted beforehand.

Re the 'Design Requirements', does this heading begin an new Section? How does one detect when that portion of the document has ended (eg end of the Section in which the heading appears, start of 'references' Section, something else)? I have no idea which code from the link you posted relates to this - it all seems to be directed at converting vba code to Visual Studio.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote