我试图创建对象NotesUIWorkspace以从Lotus Note Client V9打开Maildialog(添加附件,文本,配方,ec)但它不起作用 我正在搜索NotesUIWorkspace的参考,(我找不到)
dim obj as Object
obj = CreateObject("Notes.NotesUIWorkspace")
班级i尝试使用https://notes.helsinki.fi/help/help8_designer.nsf/2e73cbb2141acefa85256b8700688cea/027a2bc771e3cb6e8525731b004a77f6?OpenDocument#183993280029220079
来自文档
https://notes.helsinki.fi/help/help8_designer.nsf/Main?OpenFrameSet
我搜索了一些例子,但我没有找到任何有用的我的expirience级别。
有没有人有一些有用的tipps或例子?
最诚挚的问候 弗洛里安
答案 0 :(得分:1)
以下是使用C#编写UI中的备忘录的示例:
public void ComposeMemo(String sendto, String subject, String body)
{
// instantiate a Notes session and workspace
Type NotesSession = Type.GetTypeFromProgID("Notes.NotesSession");
Type NotesUIWorkspace = Type.GetTypeFromProgID("Notes.NotesUIWorkspace");
Object sess = Activator.CreateInstance(NotesSession);
Object ws = Activator.CreateInstance(NotesUIWorkspace);
// open current user's mail file
String mailServer = (String)NotesSession.InvokeMember("GetEnvironmentString", BindingFlags.InvokeMethod, null, sess, new Object[] { "MailServer", true });
String mailFile = (String)NotesSession.InvokeMember("GetEnvironmentString", BindingFlags.InvokeMethod, null, sess, new Object[] { "MailFile", true });
NotesUIWorkspace.InvokeMember("OpenDatabase", BindingFlags.InvokeMethod, null, ws, new Object[] { mailServer, mailFile });
Object uidb = NotesUIWorkspace.InvokeMember("GetCurrentDatabase", BindingFlags.InvokeMethod, null, ws, null);
Object db = NotesUIWorkspace.InvokeMember("Database", BindingFlags.GetProperty, null, uidb, null);
Type NotesDatabase = db.GetType();
// compose a new memo
Object uidoc = NotesUIWorkspace.InvokeMember("ComposeDocument", BindingFlags.InvokeMethod, null, ws, new Object[] { mailServer, mailFile, "Memo", 0, 0, true });
Type NotesUIDocument = uidoc.GetType();
NotesUIDocument.InvokeMember("FieldSetText", BindingFlags.InvokeMethod, null, uidoc, new Object[] { "EnterSendTo", sendto });
NotesUIDocument.InvokeMember("FieldSetText", BindingFlags.InvokeMethod, null, uidoc, new Object[] { "Subject", subject });
NotesUIDocument.InvokeMember("FieldSetText", BindingFlags.InvokeMethod, null, uidoc, new Object[] { "Body", body });
// bring the Notes window to the front
String windowTitle = (String)NotesUIDocument.InvokeMember("WindowTitle", BindingFlags.GetProperty, null, uidoc, null);
Interaction.AppActivate(windowTitle);
}
答案 1 :(得分:0)
您是在64位操作系统上运行吗?如果是这样,您可能会遇到Domino类的一些问题。它们不支持64位,但主要是它们可以工作。
有关其他信息的链接,请参阅我对this question的回答。