Office Document from Sql 2000

P

poolguard

I have a lot of office documents (Word, excel, and PPT) stored in a SQL 2000
Server, and i am trying to retrieve them.

I can get the document from SQL as a byte array and save that to the local
disk then open it, but is there a way to open the document from a
memorystream or the byte array?

I have tried this

Dim ms As New MemoryStream
ms.Write(curDoc.Document, 0, UBound(curDoc.Document) - 1)
CurWordApp.Documents.Open(ms)

But i get an error on the last line

Thanks
Chris
 
C

Cindy M.

Hi =?Utf-8?B?cG9vbGd1YXJk?=,
I have a lot of office documents (Word, excel, and PPT) stored in a SQL 2000
Server, and i am trying to retrieve them.

I can get the document from SQL as a byte array and save that to the local
disk then open it, but is there a way to open the document from a
memorystream or the byte array?
No, the Office object models don't support this kind of thing. It's just barely
possible in Word 2003 if you've saved the Word document's XML (instead of the
binary file), using the InsertXML method on an opened (empty) document. But
that's the extent of it.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :)
 

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