Access OLE to Word
I have a database (Access97)in which the table "T_EXERCISES" includes a OLE object Field (OLE_VIEW). I store Word Docs (embedded) in that field. After i put search criteria on a form there is a query which takes the results. All I want to do is export the docs from the query to Word.
I've tried with Publish, Merge but I get null. I think that the problem is that I can't pass through the content of the object (the formated text of the Word docs) so I could simply Copy-Paste it.
What is wrong with the code below?
Why it isn't working?
Dim objWord As Word.Application
Dim objDoc As Object
Dim rCust As Recordset
Dim dbase As Database
Set dbase = CurrentDb()
Set rCust = dbase.OpenRecordset("q_SearchList")
Set objWord = New Word.Application
objWord.Visible = True
Set objDoc = objWord.Documents.Add
objWord.Selection.Text = rCust("OLE_VIEW")
rCust.MoveNext
....
Sorry for my English, it's foreign to me.
GregoryHu
|