Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Documents opened with OpenCmd not checking in
Bowman
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
Find more posts tagged with
Comments
narek1
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)