[[程式段]]
Dim es As Object
Dim at As Object
Dim Work As Object
Dim oc As Object
Dim doc As Object
Dim strMsg As String
Dim UserName As String 'The current users notes name
Dim MailDbName As String 'THe current users notes mail database name
Dim dbleCPRow As Double
Set es = CreateObject("Notes.NotesSession")
Set Work = CreateObject("Notes.NotesUIWorkspace")
Set at = es.GetDataBase(vbNullString, MailDbName)
If Not at.IsOpen Then
at.OPENMAIL
Else
MsgBox "Mail Open Fail..!"
End If
Set oc = at.CreateDocument
With oc
.Form = "Memo"
.sendto = "david"
.Subject = "Mail Sending Try..."
End With
dblCPRow = Application.WorksheetFunction.CountIf(Range("$H$3:$H$666"), "<>") + 2 ' +2 is report title ignored
Set doc = Work.EDITDocument(True, oc)
With doc
.InsertText ("<< Mail autot Sending >> ")
Range("A2:K" & dblCPRow).Copy .Paste ===>> 我如何使用如PasteSpecial指今, 將其值轉為 "圖片" 貼至Notesl裡.
Application.CutCopyMode = False
.send
.Close
End With
Set es = Nothing
Set at = Nothing
Set Work = Nothing
Set oc = Nothing
Set doc = Nothing
MsgBox "Mail had been sent..!"作者: 劉大胃 時間: 2021-2-3 14:35
[[程式段]]
Dim es As Object
Dim at As Object
Dim Work As Object
Dim oc As Object
Dim doc As Object
Dim rgPic As Range
Dim strMsg As String
Dim UserName As String 'The current users notes name
Dim MailDbName As String 'THe current users notes mail database name
Dim dbleCPRow As Double
Set es = CreateObject("Notes.NotesSession")
Set Work = CreateObject("Notes.NotesUIWorkspace")
Set at = es.GetDataBase(vbNullString, MailDbName)
If Not at.IsOpen Then
at.OPENMAIL
Else
MsgBox "Mail Open Fail..!"
End If
Set oc = at.CreateDocument
With oc
.Form = "Memo"
.sendto = "david"
.Subject = "Mail Sending Try..."
End With
dblCPRow = Application.WorksheetFunction.CountIf(Range("$H$3H$666"), "<>") + 2 ' +2 is report title ignored
Set doc = Work.EDITDocument(True, oc)
With doc
.InsertText ("<< Mail autot Sending >> " & vbNewLine )
Set rgPic = Range("A2:K" & dblCPRow)
rgPic.CopyPicture Appearance:=xlScreen, Format:=xlPrinter ' Trans Excel Table to Picture mode.
With ActiveSheet.ChartObjects.Add(Left:=rgPic.Left, Top:=rgPic.Top, Width:=rgPic.Width, Height:=rgPic.Height) ' Set Picture name to tmpChart
.Name = "tmpChart"
.Activate
End With
.Paste
Application.CutCopyMode = False
ActiveSheet.ChartObjects("tmpChart").Delete ' Delete this template chart.
.send
.Close
End With
Set es = Nothing
Set at = Nothing
Set Work = Nothing
Set oc = Nothing
Set doc = Nothing
set rgPic =Nothing