<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
     xmlns:admin="http://webns.net/mvcb/"
     xmlns:content="http://purl.org/rss/1.0/modules/content/"
     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
	<channel> 

	<title>Comments on: Word master document creation and maintenance</title>
	<link>http://ask.metafilter.com/55304/Word-master-document-creation-and-maintenance/</link>
	<description>Comments on Ask MetaFilter post Word master document creation and maintenance</description>
	<pubDate>Thu, 18 Jan 2007 12:59:01 -0800</pubDate>
	<lastBuildDate>Thu, 18 Jan 2007 12:59:01 -0800</lastBuildDate>
	<language>en-us</language>
	<docs>http://blogs.law.harvard.edu/tech/rss</docs>
	<ttl>60</ttl>

	<item>
		<title>Question: Word master document creation and maintenance</title>
		<link>http://ask.metafilter.com/55304/Word-master-document-creation-and-maintenance</link>	
		<description>Creating and maintaining a master document in Word with sections from other documents. &lt;br /&gt;&lt;br /&gt; I have a directory full of Word documents that are all similarly formatted with Word heading outlines -- each document has a section called &quot;table of contents,&quot;  &quot;summary,&quot; &quot;requirements,&quot; etc.  They&apos;re real outlines, so if I go into, say, outline or document map viewing mode, they display correctly as collapsible trees.  The content under the headings is in paragraphs and bullet lists, and it&apos;ll be continually updated for the forseeable future.&lt;br&gt;
&lt;br&gt;
I want to create a single document that contains all of the other documents&apos; &quot;summary&quot; sections.  For each document, print its name, then the contents of its summary section.  I would like to update that master document with the other documents&apos; contents on a regular basis, and I don&apos;t want to do it by manually copying and pasting.  I also don&apos;t want to make a real &quot;master document&quot; with &quot;subdocuments,&quot; because I don&apos;t want to manually handle each document -- we only have about 20 now, but in the future ...&lt;br&gt;
&lt;br&gt;
Initially, I thought I&apos;d write a Python script using the Word object model, but the Word object model doesn&apos;t seem to support selecting text by its heading.  I wouldn&apos;t mind programatically converting the documents to RTF or XML as an intermediary step, and XML looks like it might be a candidate -- since each document has a table of contents, each heading section has an automatic bookmark, but the bookmarks are named with random numbers.  I could look at the table of contents, pull out that random ID for the heading I want, then go to the corresponding bookmark and select all text until the next bookmark.  Unfortunately, Word-generated XML is so full of formatting crap, it seems exceptionally difficult to get the final text formatted the same as the original, bullet points and all.&lt;br&gt;
&lt;br&gt;
Anyway, if I had a script that went through all the documents, pulled out the text I wanted by heading, then wrote it to a new master doc every time I ran it, I&apos;d be happy.&lt;br&gt;
&lt;br&gt;
Any ideas?  I&apos;ve searched MSDN and Google Groups and our own AskMeFi archives for the last couple of weeks to no avail, but I can&apos;t imagine that nobody&apos;s had this problem before.</description>
		<guid isPermaLink="false">post:ask.metafilter.com,2007:site.55304</guid>
		<pubDate>Thu, 18 Jan 2007 11:55:12 -0800</pubDate>
		<dc:creator>liet</dc:creator>
		
			<category>MSWord</category>
		
			<category>Python</category>
		
			<category>XML</category>
		
	</item> <item>
		<title>By: flabdablet</title>
		<link>http://ask.metafilter.com/55304/Word-master-document-creation-and-maintenance#832220</link>	
		<description>Try opening these things in OpenOffice, saving them in .odt format, then having a poke around inside the .odt files to see if the XML inside it is more useable (an .odt file is in fact just a renamed .zip archive with a well-defined substructure).  I have no idea whether this will work for you, but at least it&apos;s an idea.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2007:site.55304-832220</guid>
		<pubDate>Thu, 18 Jan 2007 12:59:01 -0800</pubDate>
		<dc:creator>flabdablet</dc:creator>
	</item><item>
		<title>By: pompomtom</title>
		<link>http://ask.metafilter.com/55304/Word-master-document-creation-and-maintenance#832621</link>	
		<description>This is what VBA is for.&lt;br&gt;
&lt;br&gt;
If you have defined sections, you just need your master doc to have  a list of the subdocs, or loop through the  directory of them, and copy/paste the chunk you want.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2007:site.55304-832621</guid>
		<pubDate>Thu, 18 Jan 2007 17:03:12 -0800</pubDate>
		<dc:creator>pompomtom</dc:creator>
	</item>
	</channel>
</rss>
