Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Filter by Application in iManExt2.BrowseCmd
RussWilmott
I have created a browse dialog for Worksite using the code below and it's working fine but I want to restrict selections to Word documents only.
Do you know the correct syntax for the context item etc. to achieve this?
Dim dms As IManDMS = New ManDMSClass
dms = New ManDMSClass
Dim sess As IManSession = dms.Sessions.Add("MARS")
sess.TrustedLogin()
Dim arrSess(0) As NRTSession
arrSess(0) = CType(sess, NRTSession)
Dim cmd As IManBrowseCmd = New IManBrowseCmdClass
Dim context As ContextItems = New ContextItemsClass
context.Add("NRTDMS", dms)
context.Add("SelectedNRTSessions", arrSess)
context.Add("IMANEXT2.BrowseCmd.SelectableObjectTypes", New imObjectType() {imObjectType.imTypeDocument})
context.Add("IMANEXT2.MultiFileSelection", False)
context.Add("ParentWindow", Me.Handle.ToInt32)
cmd.Initialize(context)
cmd.Update()
If (cmd.Status = CType(CommandStatus.nrActiveCommand, Integer)) Then
cmd.Execute()
End If
Find more posts tagged with
Comments
an31146
Use the IMANExt2Lib.IManFileOpenCmd class instead - it inherits from BrowseCmd.
The ContextItem to supply is like so:
.Add("IManExt2.FileOpFilterAppType", "WORD")
RussWilmott
Thanks very much for your help.
The IManFileOpenCmd works fine with the WORD filter apart from the fact that the button is "Open" and not "Select" as on the ImanBrowseCmd.
I guess I'll just have to accept that. It's either ImanBrowseCmd with no filtering or IManFileOpenCMd with the wrong button.