Can Someone help ME

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ms115
    New Member
    • Nov 2006
    • 2

    #1

    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.ListIn dex <> -1 Then

    If OLE1.AppIsRunni ng Then
    Set objDoc = Nothing
    OLE1.DoVerb vbOLEClosed
    OLE1.Close
    OLE1.Delete

    End If

    ' OLE1.CreateEmbe d App.path & "\" & CboFiles.Text
    OLE1.CreateLink App.path & "\" & CboFiles.Text
    'Set objDoc = OLE1.object
    OLE1.DataChange d = True
    'OLE1.SizeMode = 2

    OLE1.FileNumber = 1
    OLE1.Action = 7

    'OLE1.DoVerb vbOLEOpen
    OLE1.Visible = True

    End If

    End Sub
Working...