Home
TeamSite
Imanage Com & Client Side Languages
Huw
I need to open an imanage document in a client side language vbscript or Javascript using the OpenCMD method (works perfectly in full VB), but I have a problem , as I am forced to use late binding I cannot declare my array of documents as an NRTDocument type.
i.e.
JAVASCRIPT:
var objContextItems = new ActiveXObject("IManExt.ContextItems");
var cmdOpen = new ActiveXObject("IManExt.OpenCmd");
var varNRTDocs = Array()
var varNRTDocs[0] = pNRTDocument
objContextItems.Add("SelectedNRTDocuments",varNRTDocs);
objContextItems.Add("IManExt.OpenCmd.NoCmdUI",true);
objContextItems.Add("IManExt.OpenCmd.Integration",true);
cmdOpen.Initialize(objContextItems);
cmdOpen.Update();
cmdOpen.Execute();
var strFileLocation = objContextItems.Item("IManExt.OpenCmd.ING.FileLocation")
alert(strFileLocation);
VB
Dim varNRTDocs(8) As IManage.NRTDocument
Dim cmdOpen As IMANEXTLib.OpenCmd
Dim objContextItems As IMANEXTLib.ContextItems
Dim varNRTDocs(0)
Set varNRTDocs(0) = pNRTDocument
Set cmdOpen = New IMANEXTLib.OpenCmd
Set objContextItems = New IMANEXTLib.ContextItems
With objContextItems
.Add "SelectedNRTDocuments", varNRTDocs
.Add "IManExt.OpenCmd.NoCmdUI", True
.Add "IManExt.OpenCmd.Integration", True
End With
cmdOpen.Initialize objContextItems
cmdOpen.Update
cmdOpen.Execute
Dim strFileLocation As String
strFileLocation = objContextItems("IManExt.OpenCmd.ING.FileLocation")
MsgBox strFileLocation
Any help with this would be greatly appreciated
Find more posts tagged with
Comments
jny
Unfortunately, the IManExt.dll expects a safearray of NRTDocument Object for the SelectedNRTDocuments ContextItem, which cannot be accomplished through late-binding.
What you would need to do is write a helper object in VB6, C#, etc., that is used to invoke the OpenCmd, and instantiate this helper object in your client-side script.