error contents of olestream
Please help,
I have an OLE container on a form and I need to load the word document into the object through code. I have found code from a book in fact just for this:
Private Sub Command1_Click()
Dim nFileNumber As Integer
nFileNumber = FreeFile
Open "c:\training certificate pieces.doc" For Binary #nFileNumber
OLE1.SourceDoc = nFileNumber
*OLE1.ReadFromFile nFileNumber
Close #nFileNumber
End Sub
I copied this code right out of the book and I am getting a weird error on the line of code with the asterisk.....
Run-time error '31037'
System error &h800401c2(-2147221054). Contents of the OLESTREAM not in correct format.
geet
|