On Wed, Oct 5, 2011 at 10:30, Tim Roberts <t...@probo.com> wrote: > Anthony Mpofu wrote: >> >> I want to read contents from a word document (source) and insert the >> contents to the (destination) word document. >> ... >> 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. > > Do it exactly like you would do it by hand: go through the clipboard, > using Copy and Paste methods. > Another option is to inject the source document into the destination using "range.InsertFile" It should preserve images and such.
I have used this approach recently to generate one document out bunch of chunks stored in a database. Waldemar _______________________________________________ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32