467,161 Members | 935 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,161 developers. It's quick & easy.

Can Someone help ME

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
OLE1.Close
OLE1.Delete

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
  • viewed: 1068
Share:

Post your reply

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

Similar topics

2 posts views Thread by Sean | last post: by
5 posts views Thread by Raziq Shekha | last post: by
3 posts views Thread by MarcJessome | last post: by
7 posts views Thread by Ross Culver | last post: by
11 posts views Thread by Adrian | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.