Programatic access to MS Word document headings? RRS feed

  • Question

  • I have a JavaScript that read a series of C files and related XML documents. I then output an MS Word doc with information from the other files. But, the final purpose of the process is to update an existing Word doc with the information retrieved from the other documents.

    The final doc is a Software Design Document with headings for each of the C files.  I want to be able to automatically select the heading that matches the current C file and add in the functions with their metadata.  But I find no way to use Word.Application elements to get a collection of headings and their text blocks.  The document.sections object doesn't work as the headings don't match sections and there isn't a document.headings object (at least I can't find it or documentation for it).

    Any ideas??? 

    Frank Perry, MSEE

    Thursday, April 17, 2014 4:30 PM