U
Uri Kahn
I have defined an access database table to have an "ole
object" field. I want to insert via vba code using ado
the currently active word document into this field.
i tried the following in a button in a userform activated
by a macro in word:
dim db as new adodb.connection
dim rs as new adodb.recordset
db.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=..."
rs.Open "select * from Table1;", db, adOpenDynamic,
adLockOptimistic
rs.AddNew
rs("Attachment") = ActiveDocument
rs.Update
but i get an error "Multi-step ole db operation generated
errors..."
i also tried:
rs("Attachment").appendchunk (ActiveDocument)
here i got no error message - but when opened the database
table, i could see in the field "Long Binary Data" instead
of "Microsoft Word Document" (as i see when manually
embedding an object) and also double clicking on it
returned an error instead of opening the doc.
could anyone suggest how to fix this problem?
object" field. I want to insert via vba code using ado
the currently active word document into this field.
i tried the following in a button in a userform activated
by a macro in word:
dim db as new adodb.connection
dim rs as new adodb.recordset
db.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=..."
rs.Open "select * from Table1;", db, adOpenDynamic,
adLockOptimistic
rs.AddNew
rs("Attachment") = ActiveDocument
rs.Update
but i get an error "Multi-step ole db operation generated
errors..."
i also tried:
rs("Attachment").appendchunk (ActiveDocument)
here i got no error message - but when opened the database
table, i could see in the field "Long Binary Data" instead
of "Microsoft Word Document" (as i see when manually
embedding an object) and also double clicking on it
returned an error instead of opening the doc.
could anyone suggest how to fix this problem?