Documents opened with OpenCmd not checking in

Hi, i am using the OpenCmd to open documents and checking them out and it works great with Word and Acrobat documents, but when i use this to open a document where there is no integrated application the document is not checked back in when the application is closed., eg. ANSI file opened in Notepad.

I think that Filesite usually monitors the Notepad process and checks the document back in when the application is closed and the file in portable is no longer locked, but does this happen when you open the document using the OpenCmd api call?

Thanks.

Here is my code:

Dim MyCommand = New IMANEXTLib.OpenCmd
Dim MyContext As IMANEXTLib.ContextItems
MyContext = New IMANEXTLib.ContextItems

Dim pArrDoc(1) As IManage.NRTDocument
pArrDoc(0) = pDoc

'MsgBox(pDoc.CheckedOut)

'Required Fields
MyContext.Add("ParentWindow", GetActiveWindow)
MyContext.Add("SelectedNRTDocuments", pArrDoc)

'Optional Fields
MyContext.Add("IManExt.OpenCmd.NoCmdUI", True)
MyContext.Add("IManExt.OpenCmd.Integration", False)

MyCommand.Initialize(MyContext)
MyCommand.Update()
'if we have an OK status, display the new profile screen
If MyCommand.Status = IMANEXTLib.CommandStatus.nrActiveCommand Then

MyCommand.Execute()
'MsgBox(MyContext("ImanExt.MonitorProcessesHoldingOpenDocs"))
Else
MsgBox("OpenDocIntegrated: could not execute.", vbCritical)
End If

MyCommand = Nothing
MyContext = Nothing

Comments

  • I think you can do something like this at the end of your code

    //objDoc is IManDocument object

    If objDoc.IsAnyVersionCheckedOut Then
    objDoc.CheckIn(objDoc.CheckoutPath, CheckinDisposition.nrReplaceOriginal, CheckinOptions.nrDontKeepCheckedOut, Err)
    End If

    'Populate the ContextItems collection with values
    Context.Add("IManExt.Refresh", True)
    Context.Add("RefreshFolderContents", True)
TeamSite Developer Resources

  • Docker Automation

  • LiveSite Content Services (LSCS) REST API

  • Single Page Application (SPA) Modules

  • TeamSite Add-ons

If you are interested in gaining full access to the content, you can register for a My Support account here.
image
OpenText CE Products
TeamSite
APIs