I find Get the Word data as RTF string is biger than the word DOC file,
So, I'd better Save the word to database as a DOC file,
It's better Save the document to database in memory. than save it to disk
and then open as stream to Database,how to do this ?
thank you.
"Peter Bromberg [C# MVP]" <(E-Mail Removed)> 写入消息
news:A53DAFE4-19CC-45FB-B94C-(E-Mail Removed)...
> Try copying to the clipboard with DataFormat.Rtf .
> Then you can copy out from clipboard and try casting to byte array.
> Peter
>
> --
> Site: http://www.eggheadcafe.com
> UnBlog: http://petesbloggerama.blogspot.com
> Short urls & more: http://ittyurl.net
>
>
>
>
> "cgd" wrote:
>
>> hi,
>> i want to save the MS Word data (not the Word file) to a database,
>> so i copy the Word data to clipboard first,and then get the data to a
>> DataObject object, and then try the code below,
>>
>>
>> Formatter.Serialize(StreamTemp, dbObject); //but it can't be Serialized,
>> StreamTemp.Close();
>> Return StreamTemp.GetBuffer() ;
>>
>>
>>
>> plz, thanks for any help
>>
>>
>>
>>