By RUKpapayday loans uk

Text Size
Sunday, May 26, 2013
User Rating: / 2
PoorBest 
Here's a very simple but handy piece of code for those of you who are using eDocs (Hummingbird / Techtonics / OpenText) as a document management system.

 If you want to open a eDocs document from another application you could try adapting the following code. It was written in Microsoft Access 2003, but you should be able to adapt it to other langauges.

Private Sub OpenDoc(docNum As Long)
   On Error GoTo OpenDoc_Err:

   Dim am_readwrite As Integer
   Dim app As Object
   Dim prof As Object

   am_readwrite = 1

   'get the profile object for the given edocs file number
   Set app = CreateObject("DocsObjects.Application")
   Set prof = app.PrimaryLibrary.getProfile(docNum)

   'check that a profile exists before trying to open it
   If Not prof Is Nothing Then
      prof.CurrentVersion.Open am_readwrite
   End If

OpenDoc_Done:
   Exit Sub

OpenDoc_Err:
   Select Case Err.Number
      Case Else:
         Resume OpenDoc_Done
   End Select

End Sub

Add comment


Security code
Refresh