[IronPython] How to insert or embed a html file in to a Word doc ?

David DiCato ddicato at microsoft.com
Mon Jun 8 20:45:49 CEST 2009

This is more a question about the Office/Word APIs than anything IronPython-specific, so I'd point you to http://msdn.microsoft.com/en-us/library/bb243297.aspx as a starting point.

As far as I know, you can't embed arbitrary files in a Word document, so I'd recommend converting your HTML to a Word doc and embedding that. As far as using your <html_report> token, I would start with the search/replace APIs mentioned here: http://msdn.microsoft.com/en-us/library/f65x8z3d.aspx.

Hope this helps!
- David

From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Sivaguru Perambalam
Sent: Monday, June 08, 2009 9:32 AM
To: users at lists.ironpython.com
Subject: [IronPython] How to insert or embed a html file in to a Word doc ?


I am trying to embed a html file (a report as a result of an sql query ) in to a word document in a particular location.
I am trying to get this done using the Office<http://www.daniweb.com/forums/post886381.html> Interop & Iron Python 2.x.

1) How can I embed a html file in to a word document ?
2) How can I embed it on to a location by replacing a token in the Word doc. Eg . The word file would have a token <html_report>. The HTML file has to be embedded in the place where This token is .

Thanks !
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20090608/95d40212/attachment.html>

More information about the Ironpython-users mailing list