views:

57

answers:

1

Hi, Currently i have a word document with comments added. The structure of the document is specified in the comment. The document contains embedded images.

Now i need to structurally read the document based on the comments and create a html file. The problem is i cant capture the embedded image information currently.

        Comments comments = doc.Comments;
        foreach (Comment comment in comments)
        {
            String text = comment.Range.Text;
            String actualText = comment.Scope.Text;

        }

Can someone please help in capturing the embedded images. Also i need the exact "html" format of the document. Currently the text appears plain without any paragraph information.

+3  A: 

Integrating Microsoft Word in your .NET applications [ CodeProject ] http://www.codeproject.com/KB/office/WordInDotnet.aspx

This can help you. Just now you check the API methods. I believe that there are already methods in the API to list all files, and I think qeu you can programmatically, choose the method of viewing in HTML and then save it. Hope that helps. Have fun.

Ph.E
Thanks for the input.I am able to use CopyImage and ClipBoard functionality to get the image details.comment.Scope.CopyImage();String completeData = Clipboard.GetData(DataFormats.html).ToString();This html content contains the path of "local image file" on the disk in temporary location.Also comment.Scope.get_XML(false) get us the complete content in "xml" with image data as "bindata".
Thiyaneshwaran S