By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,988 Members | 1,476 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,988 IT Pros & Developers. It's quick & easy.

Can Someone help ME

P: 2
I build an application in VB6 to save document(of any type i.e. word , pdf, ppt) to Microsoft access database of which i have a combobox on VB form to select document to open to OLE so i can manipulate with it but its give me "runtime error 31031 method createlink of object failed" can anyone help me to solve it. my code is below

Private Sub CboFiles_Click()
If CboFiles.ListIndex <> -1 Then

If OLE1.AppIsRunning Then
Set objDoc = Nothing
OLE1.DoVerb vbOLEClosed

End If

' OLE1.CreateEmbed App.path & "\" & CboFiles.Text
OLE1.CreateLink App.path & "\" & CboFiles.Text
'Set objDoc = OLE1.object
OLE1.DataChanged = True
'OLE1.SizeMode = 2

OLE1.FileNumber = 1
OLE1.Action = 7

'OLE1.DoVerb vbOLEOpen
OLE1.Visible = True

End If

End Sub
Nov 15 '06 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.