Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Copy range in excel as image and email with lotus

Status
Not open for further replies.

VbaNewbie08

Technical User
Jun 30, 2008
12
US
I found the code below for sending an email throught lotus notes. The problem i'm having is i need it to copy Range(A1:G20) as an image and insert into the body. Im not quite sure how to do this.

Sub SendNotesMail()
Dim Maildb As Object, UserName As String, MailDbName As String
Dim MailDoc As Object, Session As Object
Set Session = CreateObject("Notes.NotesSession")
UserName = Session.UserName
MailDbName = Left$(UserName, 1) & Right$(UserName, _
(Len(UserName) - InStr(1, UserName, " "))) & ".nsf"
Set Maildb = Session.GetDatabase("", MailDbName)
If Maildb.IsOpen = True Then
Else: Maildb.OpenMail
End If
Set MailDoc = Maildb.CreateDocument
MailDoc.Form = "Memo"
MailDoc.SendTo = "RTV_Coordinator_MIDB" 'Nickname or full address
MailDoc.Subject = "RTV Dollars"


MailDoc.Body =


MailDoc.SaveMessageOnSend = True
MailDoc.PostedDate = Now
On Error GoTo Audi
Call MailDoc.Send(False)
Set Maildb = Nothing
Set MailDoc = Nothing
Set Session = Nothing
Exit Sub
Audi:
Set Maildb = Nothing
Set MailDoc = Nothing
Set Session = Nothing
MsgBox "Email Error"
End Sub

 





Check out the CopyPicture Method.

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top