Hi All I want to read contents from a word document (source) and insert the contents to the (destination) word document. I have used the following code: # Read content from source word = win32.gencache.EnsureDispatch('Word.Application') doc = word.Documents.Open("source.doc") data = word.Documents[0].Content
# Insert data read from source to destination document dest_doc = word.Documents.Open("destination.doc") startAt = dest_doc.Range(4,4) startAt.InsertBefore(data) dest_doc.SaveAs( "destination.doc" ) The above solution only copies the text content from the source document. The read contents loses the original formating (font size, font type) The read contents fails to load images from the document. Is there a method that will allow reading word content with the original formatting as well as images.
_______________________________________________ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32