showing a document to the user which is in IO.filestream object

G

Guest

HI all,

application details:
---------------------
visual studio 2003
..net 1.1, vb.net, winforms

Application read a document ( could be word, pdf, tiff, jpeg etc) from the
local filesystem into to the system.io.filestream object and now i want to
open this document up in the document;s respective software( MS word for doc,
excel for xls etc) and show it to the user. The question is how can i open
this document that is in the filestream object and show it to the user.
a. do i have to store it some where in the local cache as a temporary file
and invoke a SHELL command to open it for the user ,if so how can i store in
the cache, any code references woudl be good and also how to program this
shell command.

b. is there any way that i can just take the filestream object and somehow
just show it to the user and somehow .net opens up the document in it;s own
respective folder.

thanks in advance
sameer
 
G

Guest

Hope you can open the document in the native software itself.steps to follow
to open the document.

1.check wheather all the required document s/w has been installed in you
system for example when you want to open a .doc file you need to have
microsoft word to be installed in your system if this is OK go to tool box
and you can inculde the word dll in the component list.

2 Drag drop the component in the form
3.Find out the file type.
4.Based on the file type pass that file to the corresponding software as input
5. now the file will be open the native software itself

Better way is to use the .net document reader controls.because since it is
desktop application you need to have the licenced s/w to be install in all
the client

Regards
Prabakar
 
G

Guest

Prabakar , thanks for your reply but i dont think i want to take this route
because the user can upload all the possible files with all difference
extensions that exist in the world. If i start using a .net document reder
then to open up my appilcation the user has to depend on the s/w component
that comes with my software and if there are none then the user can not open
it else i have to some how keepuploading my appilcation with different s/w
libararies which is very tedious.

The alternative that i fond is using the process.startinfo class, i am
downloadig the document to the temp folder and using the execute<somthing>
method of this class to open up the document and this seems to be working
fine.

any other suggestions.

thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top