Click here to Skip to main content
15,940,921 members
Please Sign up or sign in to vote.
4.00/5 (2 votes)
See more:
Does anyone know how to display an image from a .doc file? Like a little preview of a page?

Thanks a lot!
Posted
Updated 4-Oct-10 0:23am
v2
Comments
Toli Cuturicu 4-Oct-10 9:24am    
Yes. Someone knows that for sure. I don't.

1 solution

Here is one tedious solution.

1. Download[^] IECapt. (please read the document, to see how to use this)

2. Create a webpage where you pass document path, as a query string and it will display that document. (you need to use office automation to show doc / xls file)

3. now call the IECapt exe (using System.Diagnostics.Process class), using your webpage. and pass the url to the page you have previously created with specific document path as query string.

4. this will store the image of the webpage in specified folder.

5. now read that image and display as thumbnail.

I know this is messy solution, but all the other easy methods are not free, unless you want to buy those controls.

:)
 
Share this answer
 
Comments
mollewe 5-Oct-10 2:27am    
Thank you. I did this with a little help from this website: http://stanblog.jojoyao.com/2007/02/create-thumbnails-of-powerpoint-presentations-in-c/

It takes about 10 seconds per Document wich is ugly... But it's getting me closer to what I want.
Thanks a lot.
Rutvik Dave 5-Oct-10 10:38am    
Interesting... I was wondering, how else you can do this. Thanks for sharing.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900