|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
单位Lotus notes设定必须选好邮件安全级别,见图,请问要在下述代码中怎么实现选中“restricted",并自动发信。万分感谢。
Sub SendFormatData()
Dim aNotesUI
Dim aDocUI
Dim strTo As String
Dim strCC As String
Dim strSub As String
Dim strBody As String
Dim rngSel As Range
Worksheets("SMS").Range("A1:M49").CopyPicture Appearance:=xlScreen, Format:=xlPicture
Set aNotesUI = CreateObject("Notes.NotesUIWorkspace")
Set aDocUI = aNotesUI.COMPOSEDOCUMENT(mailserver$, mailfile$, "Memo")
Set aDocUI = aNotesUI.CURRENTDOCUMENT
strTo = "kathycyli@hsbc.com.cn"
'strCC = "test2@xxx.com"
strSub = "test"
strBody = "Here is a test with picture from Excel"
Call aDocUI.FIELDSETTEXT("EnterSendTo", strTo)
'Call aDocUI.FIELDSETTEXT("EnterCopyTo", strCC)
Call aDocUI.FIELDSETTEXT("Subject", strSub)
Call aDocUI.FIELDAPPENDTEXT("Body", vbCrLf & strBody & vbCrLf)
Call aDocUI.GOTOFIELD("Body")
Call aDocUI.Paste
Call aDocUI.Save
Call aDocUI.Send(True)
Application.CutCopyMode = False
Set aDocUI = Nothing
Set aNotesUI = Nothing
Set rngSel = Nothing
End Sub
|
|