Word document upload
I want to upload a word document with a word VB macro in my database. If
I finish a document I just want to start a macro which uploads it to the
Right now I can upload a document over an ASP WEB Interface which copies
the document to the server and then inserts the file as BLOB by using the
stream object. If I use my Word macro I can create a new document on the
server but I could not upload the document itself as a BOLB. I tried the
same code as in the ASP:
Dim mStream As New ADODB.Stream
mstreamType = 1
querystr = "SELECT * FROM Docs WHERE ID=0"
ObjectRs.Open querystr, cn
ObjectRs.Fields("BLOB") = mStream.Read
The mStream.Read gives me back the message: Operation is not allowed in this
context. Do I have to change something in the Word options ?
A better way would be to use directly the word object to upload it to the
server and not the file but I didn't found such an object in the help files
of VB Word
Could anybody help me ?
Re: Word document upload
I found the error. I forgot the point to set the Stream type to 1.
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL