输入问题?
Sub SendNotesMail(Subject As String, Attachment, Recipient As String, BodyText As String, SaveIt)
'Set up the objects required for Automation into lotus notes
Dim Maildb 'The mail database
Dim UserName 'The current users notes name
Dim MailDbName 'THe current users notes mail database name
Dim MailDoc 'The mail document itself
Dim AttachME 'The attachment richtextfile object
Dim Session 'The notes session
Dim EmbedObj 'The embedded object (Attachment)
'Start a session to notes
Set Session = CreateObject("Notes.NotesSession")
'Get the sessions username and then calculate the mail file name
'You may or may not need this as for MailDBname with some systems you
'can pass an empty string
UserName = Session.UserName
MailDbName = Left(UserName, 1) & Right(UserName, (Len(UserName) - InStr(1, UserName, " "))) & ".nsf"
'Open the mail database in notes
Set Maildb = Session.GETDATABASE("", MailDbName)
'Set Maildb = Session.GETDATABASE("", "mail.box")
If Maildb.ISOPEN = True Then
'Already open for mail
Else
Maildb.OPENMAIL
End If
'Set up the new mail document
Set MailDoc = Maildb.createdocument
MailDoc.form = "Memo"
MailDoc.sendto = Recipient
MailDoc.Subject = Subject
MailDoc.Body = BodyText
MailDoc.SAVEMESSAGEONSEND = SaveIt
'Set up the embedded object and attachment and attach it
If Attachment <> "" Then
Set AttachME = MailDoc.CREATERICHTEXTITEM("Attachment")
Set EmbedObj = AttachME.EMBEDOBJECT(1454, "", Attachment, "Attachment")
'MailDoc.CREATERICHTEXTITEM ("Attachment")
End If
'Send the document
MailDoc.Send 0, Recipient
'Clean Up
Set Maildb = Nothing
Set MailDoc = Nothing
Set AttachME = Nothing
Set Session = Nothing
Set EmbedObj = Nothing
End Sub
Sub main()
Call SendNotesMail("this is a test subject", "C:\test.jpg", "test user2", "My Message", True)
End Sub
关于这段代码,我将CreateObject 改为先引用Object (Lotus Domino Object-domobj.tlb) 然后用,Dim Session As New Domino.NotesSession
(程序出错)就有一些方法用不了,请问是什么原因,还有别一个Object (Lotus Notes Automation Class-Notes32.tlb)这个和前一个的方法都很多相同,有什么区别?
我在网上也找了一些资料都没有说有过我现在的这种情况。还有一点我怎么样可以不需要安装Lotus Domino我想把NotesSession (发邮件功能)
这个Class独立打包出来供C#调用,网上哪里是否有下载。我以前也没有接触过 Lotus Domino 请高手帮忙啊!给100分.
'Set up the objects required for Automation into lotus notes
Dim Maildb 'The mail database
Dim UserName 'The current users notes name
Dim MailDbName 'THe current users notes mail database name
Dim MailDoc 'The mail document itself
Dim AttachME 'The attachment richtextfile object
Dim Session 'The notes session
Dim EmbedObj 'The embedded object (Attachment)
'Start a session to notes
Set Session = CreateObject("Notes.NotesSession")
'Get the sessions username and then calculate the mail file name
'You may or may not need this as for MailDBname with some systems you
'can pass an empty string
UserName = Session.UserName
MailDbName = Left(UserName, 1) & Right(UserName, (Len(UserName) - InStr(1, UserName, " "))) & ".nsf"
'Open the mail database in notes
Set Maildb = Session.GETDATABASE("", MailDbName)
'Set Maildb = Session.GETDATABASE("", "mail.box")
If Maildb.ISOPEN = True Then
'Already open for mail
Else
Maildb.OPENMAIL
End If
'Set up the new mail document
Set MailDoc = Maildb.createdocument
MailDoc.form = "Memo"
MailDoc.sendto = Recipient
MailDoc.Subject = Subject
MailDoc.Body = BodyText
MailDoc.SAVEMESSAGEONSEND = SaveIt
'Set up the embedded object and attachment and attach it
If Attachment <> "" Then
Set AttachME = MailDoc.CREATERICHTEXTITEM("Attachment")
Set EmbedObj = AttachME.EMBEDOBJECT(1454, "", Attachment, "Attachment")
'MailDoc.CREATERICHTEXTITEM ("Attachment")
End If
'Send the document
MailDoc.Send 0, Recipient
'Clean Up
Set Maildb = Nothing
Set MailDoc = Nothing
Set AttachME = Nothing
Set Session = Nothing
Set EmbedObj = Nothing
End Sub
Sub main()
Call SendNotesMail("this is a test subject", "C:\test.jpg", "test user2", "My Message", True)
End Sub
关于这段代码,我将CreateObject 改为先引用Object (Lotus Domino Object-domobj.tlb) 然后用,Dim Session As New Domino.NotesSession
(程序出错)就有一些方法用不了,请问是什么原因,还有别一个Object (Lotus Notes Automation Class-Notes32.tlb)这个和前一个的方法都很多相同,有什么区别?
我在网上也找了一些资料都没有说有过我现在的这种情况。还有一点我怎么样可以不需要安装Lotus Domino我想把NotesSession (发邮件功能)
这个Class独立打包出来供C#调用,网上哪里是否有下载。我以前也没有接触过 Lotus Domino 请高手帮忙啊!给100分.
...全文
相关推荐
我如何根据输入的不同提出一个是或否的问题?
我在高中的时候有基础编程课程,负责一个项目,该项目的目的是制作一个向老师问好的程序,并给出一段描述为什么编程在当今时代很有价值的段落。我最初的想法是制作一个招呼老师的程序...
如何解决手机文字输入导致玩家交互困难的问题?.rar
如何解决手机文字输入导致玩家交互困难的问题?.rar
您是否正面临运算放大器输入共模范围超出的问题?
根据一些对您的应用最为重要的参数,为您的电路选择一个运算放大器(op amp),需要一个复杂的过程。您查看的一些参数可能会包括电源电压、增益带宽积、转换速率和输入噪声电压等等。
IOS 解决输入框被键盘遮挡问题
当键盘高度高于输入框的时候,界面向上拉 从而解决输入框遮挡问题
swift-一句代码解决键盘遮挡输入框问题
一句代码解决键盘遮挡输入框问题!


