aaahhhrrggghhhh
Programmer
Hi all.
I have a word document (myworddoc.doc) on my hard drive and I have an access database. when I click on a button in the database on a form I created, it should take the word document and insert it into an OLE object field within the table MyTable, programmatically.
MyTable...
Id Autonumber
MyOLEField OLE Object
How can I achieve this? I am currently using DAO recordsets to insert it as the "Insert" SQL statement does not work with this. I tried the statement :
... declared object of type word.document, etc. mydoc now contains the word document
myRS.Fields("MyOLEField" = mydoc.ActiveWindow.Document.ActiveWindow.Application.ActiveDocument
however, when it is inserted, it goes in as a "long binary data" datatype. When I click on it, a msgbox appears saying "a problem occured while the system was communicating with the OLE server or activeX control". I have given up on trying to insert it this way.
Any offers??
Regards,
Mr Big.
PS. I cant use bound controls on my form as I have other stuff on there - would be too messy even with visible turned off. Dont be small. be BIG
I have a word document (myworddoc.doc) on my hard drive and I have an access database. when I click on a button in the database on a form I created, it should take the word document and insert it into an OLE object field within the table MyTable, programmatically.
MyTable...
Id Autonumber
MyOLEField OLE Object
How can I achieve this? I am currently using DAO recordsets to insert it as the "Insert" SQL statement does not work with this. I tried the statement :
... declared object of type word.document, etc. mydoc now contains the word document
myRS.Fields("MyOLEField" = mydoc.ActiveWindow.Document.ActiveWindow.Application.ActiveDocument
however, when it is inserted, it goes in as a "long binary data" datatype. When I click on it, a msgbox appears saying "a problem occured while the system was communicating with the OLE server or activeX control". I have given up on trying to insert it this way.
Any offers??
Regards,
Mr Big.
PS. I cant use bound controls on my form as I have other stuff on there - would be too messy even with visible turned off. Dont be small. be BIG