Home
TeamSite
ShowSaveAsOptionsDlg in C#
Martin_Waller
Hello,
I'm trying to write a version of ShowSaveAsOptionsDlg in C#. I can create a session and get to the NRTDatabase object without issue. The problem I have is obtaining an NRTDocument object for the file (currently residing as a word document on the main drive) that I want the user to save. Can anyone point me in the right direction please?
Many thanks
Martin
Find more posts tagged with
Comments
narek1
Hi Martin
I guess you're looking for IManDocument object, if yes here is the code
IManSession session = null;
IManDatabases imanDatabases = null;
IManDatabase imanDatabase = null;
IManDocument doc = null;
dms = new ManDMSClass();
session = dms.Sessions.Add("Your WorkSite Server Name");
session.Login("WorkSite Server Login Id", "WorkSite Server Login Password");
imanDatabases = session.Databases;
imanDatabase = imanDatabases.ItemByName("Your Database Name");//You can also use ItemByIndex
doc = imanDatabase.GetDocument("Document Number", "Document Version");//now by using doc object you can perform many actions
Martin_Waller
Hi, Many thanks for the reply. It's mighty quiet here in the Forums!
The problem I have is actually reading a file from the local disk, such as C:\MyDocument.doc, before checking it into the database.
Is it possible to load c:\MyDocument.doc into a IManDocument object before saving it (Checking it in) or should I be using some other object.
Many thanks
Martin
narek1
Hi Martin
Based on my knowledge we can't get hold of IManDocument object without checing in document [new]. Sorry I couldn't help you.