Hello, Please find below VBA code. Thanks
Option Compare Text Dim NSession As Object Dim NDatabase As Object Dim NUIWorkSpace As Object Dim NDoc As Object Dim NUIdoc As Object Sub email_notification(ByVal wrkbk_nm As String, ByVal notes_id As String) ' source mrexcel Set NSession = CreateObject("Notes.NotesSession") Set NUIWorkSpace = CreateObject("Notes.NotesUIWorkspace") Set NDatabase = NSession.GetDatabase("", "") If Not NDatabase.IsOpen Then NDatabase.OPENMAIL End If 'Create a new document Set NDoc = NDatabase.CreateDocument todaydt = Format(Date, "dd/mmm/yy") ccRecipient = "bkenn...@in.ibm.com, sethu.ra...@in.ibm.com, ncn.ku...@in.ibm.com, nadeem.sh...@in.ibm.com, pramod.si...@in.ibm.com, shrut...@in.ibm.com" With NDoc .sendto = notes_id 'CHANGE THIS '.CopyTo = ccRecipient .Subject = "Test mail - Daily Reports Dispatching - " & todaydt 'Email body text, including marker text which will be replaced by the Excel cells .Body = "Hi" & vbNewLine & vbNewLine & "Below is the list of reports you have been assigned today." & vbNewLine & vbNewLine & _ "**PASTE EXCEL CELLS HERE**" & vbNewLine & vbNewLine & _ "Thanks & Regards" & vbNewLine & vbNewLine & "Shruthi Verma" .Save True, False End With Set AttachME = NDoc.CreateRichTextItem(wrkbk_nm) Set EmbedObj1 = AttachME.EmbedObject(1454, "", wrkbk_nm, "") Set NUIdoc = NUIWorkSpace.EDITDocument(True, NDoc) With NUIdoc .GOTOFIELD ("Body") .FINDSTRING "**PASTE EXCEL CELLS HERE**" 'Uncomment to leave the marker text in place (cells are inserted immediately before) 'Replace it with the Excel cells Sheets("Details").UsedRange.Copy 'CHANGE THIS .Paste .Send .Close End With Application.CutCopyMode = False Set NSession = Nothing End Sub On Thu, Aug 25, 2011 at 2:22 AM, XLS S <xlst...@gmail.com> wrote: > please send vba code....... > > > On Wed, Aug 24, 2011 at 7:52 PM, Chandra Shekar < > chandrashekarb....@gmail.com> wrote: > >> Hello, >> >> I am getting "**PASTE EXCEL CELLS HERE**" error(Range Not found) when I >> send mail by using vba code. Please let me know whats the error is. >> >> Thanks, >> >> Chandru >> >> -- >> >> ---------------------------------------------------------------------------------- >> Some important links for excel users: >> 1. Follow us on TWITTER for tips tricks and links : >> http://twitter.com/exceldailytip >> 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310 >> 3. Excel tutorials at http://www.excel-macros.blogspot.com >> 4. Learn VBA Macros at http://www.quickvba.blogspot.com >> 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com >> >> To post to this group, send email to excel-macros@googlegroups.com >> >> <><><><><><><><><><><><><><><><><><><><><><> >> Like our page on facebook , Just follow below link >> http://www.facebook.com/discussexcel >> > > > > -- > ......................... > > > -- > > ---------------------------------------------------------------------------------- > Some important links for excel users: > 1. Follow us on TWITTER for tips tricks and links : > http://twitter.com/exceldailytip > 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310 > 3. Excel tutorials at http://www.excel-macros.blogspot.com > 4. Learn VBA Macros at http://www.quickvba.blogspot.com > 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com > > To post to this group, send email to excel-macros@googlegroups.com > > <><><><><><><><><><><><><><><><><><><><><><> > Like our page on facebook , Just follow below link > http://www.facebook.com/discussexcel > -- ---------------------------------------------------------------------------------- Some important links for excel users: 1. Follow us on TWITTER for tips tricks and links : http://twitter.com/exceldailytip 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310 3. Excel tutorials at http://www.excel-macros.blogspot.com 4. Learn VBA Macros at http://www.quickvba.blogspot.com 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com To post to this group, send email to excel-macros@googlegroups.com <><><><><><><><><><><><><><><><><><><><><><> Like our page on facebook , Just follow below link http://www.facebook.com/discussexcel