Hi, i am trying to send a email from lotus notes(version9) below mentionedcode works fine for sometime and than i received debugging error. As i new to VBA I dont know what to replace with the code for Set NUIdoc = NUIWorkSpace.EDITDocument(True, NDoc) and .GotoField ("Body").
Any help really appreciated.
thanks
Dev
Any help really appreciated.
thanks
Dev
Code:
Sub Notes_Email_Excel_Cells()
Dim NSession As Object
Dim NDatabase As Object
Dim NUIWorkSpace As Object
Dim NDoc As Object
Dim NUIdoc As Object
Set NSession = CreateObject("Notes.NotesSession")
Set NUIWorkSpace = CreateObject("Notes.NotesUIWorkspace")
Set NDatabase = NSession.GetDatabase("", "")
If Not NDatabase.IsOpen Then
NDatabase.OPENMAIL
End If
Set NDoc = NDatabase.CreateDocument
With NDoc
.SendTo = Range("F6").Value
.CopyTo = ""
.Subject = Range("Y17").Value & " " & Now
.body = "."
.Save True, False
End With
Set NUIdoc = NUIWorkSpace.EDITDocument(True, NDoc)
With NUIdoc
.GotoField ("Body")
.FINDSTRING "."
ActiveSheet.Shapes.Range(Array("Picture 5")).Select
Selection.Copy
.Paste
Application.CutCopyMode = False
'
End With
Set NSession = Nothing
End Sub
Last edited by a moderator: