On Jul 24, 6:44*pm, "Peter Duniho" <NpOeStPe...@nnowslpianmk.com>
wrote:
Quote:
On Thu, 24 Jul 2008 05:13:41 -0700,NitinMahajan<nitinhung...@gmail.com*
wrote:
>
>
Quote:
Is there a way in C# to create a word object directly from a memory
stream without passing that to hard disk (file stream). I think it
doesn't makes sense to create a file just to read it again in to word
object. If some one has some brilliant idea please share.
>
Quote:
In a nutshell this is what I'm currently doing
ByteArray --File Stream --Word Object
and this I want to do
ByteArray --Memory Stream --Word Object
>
No "brilliant idea". *Just replace your FileStream instance with a *
MemoryStream instance, simple as that.
>
Ideally, your code would have created a FileStream but used it just as a *
Stream. *If so, it's a simple one-line change. *If you declared your *
stream usage as FileStream and then used something that's actually *
declared only in the FileStream class, you might have a little extra *
work. *But that's probably not the case.
>
Pete
Pete
I dont think it will work because I'm currently using .net 1.1 and
they way the word object can be created is creating a word document
from a file stream and then using that word doc. Now the problem is I
dont want to create a word document physically on the hard disk. I
want to create the word object directly from bytearray as the word
document is stored as blob in database.
Also its a different case from creating XML as in .net there is
inbuilt support for XML but not for word.
I hope I'm clear this time. In anycase thanks for your help.
cheers
nitin