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").
what i want a code for pasting a picture from excel sheet (picture 5) to body of the email, without editing the body for e.g the below code does that but it first goes to body write (.) and again it goes back to body find (.) and paste the picture. i want it to be pasted in the first time itself rather rounding around.
Any help really appreciated.
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