Private Sub CommandButton1_Click() agentname = Sheet1.Cells(1, 1) Dim oWrkSpace As Object Dim oCrntDoc As Object
Set oWrkSpace = CreateObject("Lotus.NotesSession") Set oCrntDoc = oWrkSpace.currentDocument Call oCrntDoc.FieldSetText("EmailSentTo", "murtaza") Call oCrntDoc.FieldSetText("EnterCopyTo", sCopyTo) Call oCrntDoc.FieldSetText("Immediate Feedback", sSubject) Call oCrntDoc.FieldAppendText("Hi All" + vbNewLine + "Please find attached the Immediate feedback tracker for " + agentsname + " and please revert for any clarifications or suggestions", vbNewLine & sBody) Call oCrntDoc.GoToField("body") Call oCrntDoc.Paste Call oCrntDoc.Save(True, False, False) Call oCrntDoc.Send(True) Set oCrntDoc = Nothing Set oWrkSpace = Nothing AppActivate ("Notes") End Sub i tried to modify the code a little bit and this is wat i did. Can you help me more with it? On Feb 13, 1:16 am, Dev <nvdev.i...@gmail.com> wrote: > This is not tested...Just pulled from my memory. The below script > combines both vba and lotus script. More faster and elegant. > > Dim oWrkSpace As Object > Dim oCrntDoc As Object > > Set oWrkSpace = CreateObject ("Notes.NotesUIWorkSpace") > Set oCrntDoc = oWrkSpace.CurrentDocument > > Call oCrntDoc.FieldSetText("EnterSendTo", sEmailId) > Call oCrntDoc.FieldSetText("EnterCopyTo", sCopyTo) > Call oCrntDoc.FieldSetText("Subject", sSubject) > > Call oCrntDoc.FieldAppendText("Body", vbNewLine & sBody) > > Call oCrntDoc.GoToField("Body") > Call oCrntDoc.Paste > Call oCrntDoc.Save(True, False, False) > Call oCrntDoc.Send(True) > > Set oCrntDoc = Nothing > Set oWrkSpace = Nothing > > AppActivate ("Notes") > > Hope this helps! > > Thank you, > Dev > > On Feb 12, 4:26 am, Darshan Amreliya <amreliya1...@gmail.com> wrote: > > > > > Hi > > I required a macro to send a email via Lotus notes using excel > > > Please do the needful asap > > -- > > Regards > > > Darshan Amreliya- Hide quoted text - > > - Show quoted text - --~--~---------~--~----~------------~-------~--~----~ Visit the blog to download Excel tutorials at http://www.excel-macros.blogspot.com To post to this group, send email to excel-macros@googlegroups.com For more options, visit this group at http://groups.google.com/group/excel-macros?hl=en Visit & Join Our Orkut Community at http://www.orkut.com/Community.aspx?cmm=22913620 To Learn VBA Macros Please visit http://www.vbamacros.blogspot.com To see the Daily Excel Tips, Go to: http://exceldailytip.blogspot.com If you find any spam message in the group, please send an email to Ayush @ jainayus...@gmail.com -~----------~----~----~----~------~----~------~--~---