I need a Python program, which opens a Microsoft Word document, extracts data from it, modifies the document and saves the result. The command-line interface is enough for me.
1) The user says how to open a document
a) "current": program should connect to Word and use the currently open document
b) "file": the user gives the path to a Word file
2) Extracting data
The program should construct the table of contents from heading-styles. The table should also contain the paragraphs, which contain the text "MEETO".
3) Changing the document
The users selects a section or meeto-paragraph in the table of contents. The program deletes the selection
a) permanently, or
b) with "track changes" option.
4) Saving the document
If the original document name is "[url removed, login to view]", then the new document should be named "[url removed, login to view]".