I am using Excel (XP,2000) as the front end to load data into Access
(2000)
The worksheet has an embedded Word object '=EMBED("Word.Document.8","")
in the worksheet.
The 'Data Type' for the field that is supposed to receive the object in
the Access table is 'OLE Object'.
Here is the code... which results in a
'Run Time Error 438.
'Object doesn't support this property or method.
--I have tried other variations with different erros.
Sub Send()
Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim ws As DAO.Workspace
Dim wObj As Object
Set ws = DAO.CreateWorkspace("", "admin", "", dbUseJet)
Set db = ws.OpenDatabase("H:\Reports\StaffReports.mdb")
Set rs = db.OpenRecordset("tblReports")
Set wObj = Worksheets("Main").Shapes("Object 17")
With rs
.AddNew
.Fields("Mgr") = Range("b2")
.Fields("wordObj") = wObj
.Update
End With
rs.Close
db.Close
ws.Close
End Sub
------------------------------------------
Any help is greatly appreciated.
Thanks
MJ
Bookmarks