FileSaveCmd with no UI
Hi
I'm looking to invoke the FileSaveCmd from the Document_New event to save a new document straight to Worksite without any user intervention.
I've followed a few examples from the this site, but when I run the code, the file save dialog is still displayed despite the fact that I set the context item iManExt.OpenCmd.NoCmdUI as true (although I wonder why it's OpenCmd and not something else). I can do a SendKeys, but that's really messy and a bit of a cop out.
I have checked that all the required attributes are filled in within the dialog when it is displayed, and they are, but I'm now at a loss at to how to resolve this. Please see the example code below - any assistance would be of great help
Many thanks
Jamie
Dim vDefLoc As String = "\earch Results\!nrtdms:0:!session::!database:Worksite:!page:7:\!nrtdms:0:!session::!database:Worksite:!folderrdinary,11:"
Dim pFileSaveCmd As IMANEXT2Lib.IManFileSaveCmd
Set pContextItems = New IMANEXTLib.ContextItems
Set pFileSaveCmd = New IMANEXT2Lib.IManFileSaveCmd
pContextItems.Add "ParentWindow", 0
pContextItems.Add "IManDMS", iDMS
pContextItems.Add "IManExt2.DocOpenLocation", vDefLoc
pContextItems.Add "IManExt.Import.DocType", "WORDX"
pContextItems.Add "iManExt.Import.DocAuthor", pSession.UserId
pContextItems.Add "iManExt.Import.DocClass", "DOC"
pContextItems.Add "NewProfile.ProfileNoUI", True
pContextItems.Add "iManExt.OpenCmd.NoCmdUI", True
pContextItems.Add "iManExt.Import.DocDescription", "Test Document"
pFileSaveCmd.Initialize pContextItems
pFileSaveCmd.Update
pFileSaveCmd.Execute
I'm looking to invoke the FileSaveCmd from the Document_New event to save a new document straight to Worksite without any user intervention.
I've followed a few examples from the this site, but when I run the code, the file save dialog is still displayed despite the fact that I set the context item iManExt.OpenCmd.NoCmdUI as true (although I wonder why it's OpenCmd and not something else). I can do a SendKeys, but that's really messy and a bit of a cop out.
I have checked that all the required attributes are filled in within the dialog when it is displayed, and they are, but I'm now at a loss at to how to resolve this. Please see the example code below - any assistance would be of great help
Many thanks
Jamie
Dim vDefLoc As String = "\earch Results\!nrtdms:0:!session::!database:Worksite:!page:7:\!nrtdms:0:!session::!database:Worksite:!folderrdinary,11:"
Dim pFileSaveCmd As IMANEXT2Lib.IManFileSaveCmd
Set pContextItems = New IMANEXTLib.ContextItems
Set pFileSaveCmd = New IMANEXT2Lib.IManFileSaveCmd
pContextItems.Add "ParentWindow", 0
pContextItems.Add "IManDMS", iDMS
pContextItems.Add "IManExt2.DocOpenLocation", vDefLoc
pContextItems.Add "IManExt.Import.DocType", "WORDX"
pContextItems.Add "iManExt.Import.DocAuthor", pSession.UserId
pContextItems.Add "iManExt.Import.DocClass", "DOC"
pContextItems.Add "NewProfile.ProfileNoUI", True
pContextItems.Add "iManExt.OpenCmd.NoCmdUI", True
pContextItems.Add "iManExt.Import.DocDescription", "Test Document"
pFileSaveCmd.Initialize pContextItems
pFileSaveCmd.Update
pFileSaveCmd.Execute
0
Categories
- All Categories
- 108 Developer Announcements
- 53 Articles
- 106 General Questions
- 144 IM Services
- 43 OpenText Hackathon
- 32 Developer Tools
- 20.6K Analytics
- 4.1K AppWorks
- 8.9K Extended ECM
- 899 Cloud Fax and Notifications
- 77 Digital Asset Management
- 9.3K Documentum
- 29 eDOCS
- 120 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management
TeamSite Developer Resources
If you are interested in gaining full access to the content, you can register for a My Support account here.
- 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.