August 7th, 2012, 12:46 PM
Extract sections of word doc into seperate files using a scripting language
Can someone let me know if it is possible to break a word document, section-wise and make each section a new word document including the text and diagram in it. Also the name of the document is the title of the section.
August 7th, 2012, 04:08 PM
I would think it's possible using whatever version of BASIC is the language of Word macros. I've written excel macros, but not Word macros, and I'm not offering to do the job.
But anyway, my advice: investigate the MSWord macro language features or ask at a Microsoft forum.
I'm quite sure that the unix split program will not make useful partitions of a .doc file in the way you intend.
[/code] are essential for python code and Makefiles!
August 8th, 2012, 06:13 AM
Just curious, are you attempting some automation, or is it just one time job.
Anyway, you will have use the win32 module from python and read the COM object model (from microsoft). I am sure some of those functions should help you what you need. For splitting the doc, you should be clear what defines a section, I mean there are different heading styles which are supported.
In short it is not trivial.