Click here to Skip to main content
15,884,176 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am creating a simple document previewer. This application must preview any file type on a panel (just like ms outlook preview pane). My problem is, I am using web browser component in vb.net, when I opened a MS Office document, a dialog box always pop up asking to save or open the document. Is there any other component that may i use to preview all the documents I wish to preview?
Posted
Comments
Scualito 27-Apr-15 7:24am    
Hello

I have exactly the same issue.
Have you find a solution ?

Thanks !

Pascal

1 solution

When Outlook displays a preview it does it for files attached to the email and for that are already presented on the local machine (you actually downloaded them with the email)...
When you are try to preview a document via web page you first have to download the document to the client (local machine) to access it and do some preview, that's the reason the web component asks you for save or open...
What actually happening that the web component is the same like your IE browser and use the same settings from the system IE uses...In the system a document can be opened in 3 way:
1. the document type is known and there is a plug-in for display - IE (web component) will display it
2. the document type is known but no plug in - IE (web component) will provide you with the option to save it or open with an external application
3. the document type is unknown - IE (web component) will provide you with the option to save it
In all cases the whole document will be downloaded to your computer (local machine) and it hardly can be called as 'preview'...
If you want to offer a 'real' preview it may be better to create a preview image of the document on the server side and present it to the user as image...
 
Share this answer
 

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