OpenCmd cmd = new OpenCmd();long handle = (long)this.Handle;ContextItems contextItems = new ContextItems();IManDMS DMSServer = new ManDMSClass();IManSession CurrentSession = DMSServer.Sessions.Add("BDO-DMSTRAIN");NRTDocument document = (NRTDocument)CurrentSession.WorkArea.Worklist.Item ByID("!nrtdms:0:!session:BDO-DMSTRAIN:!database:RASTRAIN:!document:389,1:");contextItems.Add("NRTDocument", document);contextItems.Add("IManExt.OpenCmd.Integration", true);cmd.Initialize(contextItems);cmd.Update();cmd.Execute();
OpenCmd will just download the document to the appropriate directory in the C:\NrPrtbl folder tree and then check it out. It's up to you to open the document explicitly. To do that you can either use the relevant object model (Excel, Word, whatever), or you can trust Windows to do the job for you by doing a ShellExecute or somesuch.