Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Sending An Email To Web-Based Lotus Notes 7
Good Morning I really hope some one can help. My colleague has a program
which used to send a document directly to Lotus Notes Version 5. Our company has now migrated to a web-based Lotus Notes 7, where we need to log on to our intranet site first...http://www.insidebrady.com/web/Porta...f?OpenDatabase and then enter a user name and password. Not surprisingly, the code no longer works which I have listed at the bottom. Is it still possible to send Emails in this way. Any help would be really appreciated 'Public Sub SendNotesMail(Subject as string, attachment as string, 'recipient as string, bodytext as string,saveit as Boolean) 'This public sub will send a mail and attachment if neccessary to the 'recipient including the body text. 'Requires that notes client is installed on the system. Public Sub SendNotesMail(Subject As String, Attachment As String, Recipient As String, BodyText As String) Dim Maildb As Object 'The mail database Dim UserName As String 'The current users notes name Dim MailDbName As String 'The current users notes mail database name Dim MailDoc As Object 'The mail document itself Dim AttachME As Object 'The attachment richtextfile object Dim Session As Object 'The notes session Dim EmbedObj As Object 'The embedded object (Attachment) Dim Recip(10) As Variant 'The Recipient list Dim SaveIt As Boolean 'Save to sent mail Dim WasOpen As Integer 'Checking to see if the Mail DB was already 'open to determine if session should be 'closed (0) or left alone (1) SaveIt = True 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 WasOpen = 1 'Already open for mail Else WasOpen = 0 Maildb.OPENMAIL 'This will prompt you for password End If Set MailDoc = Maildb.CREATEDOCUMENT MailDoc.Form = "Memo" MailDoc.sendto = Recipient 'Or use Racip(10) for multiple MailDoc.Subject = Subject MailDoc.body = BodyText MailDoc.SAVEMESSAGEONSEND = SaveIt If Attachment < "" Then Set AttachME = MailDoc.CREATERICHTEXTITEM("Attachment") Set EmbedObj = AttachME.EMBEDOBJECT(1454, "", Attachment, "Attachment") MailDoc.CREATERICHTEXTITEM ("Attachment") End If MailDoc.PostedDate = Now() 'Gets the mail to appear in the sent items folder MailDoc.SEND 0, Recipient 'Clean Up' Range("A1").Select Application.CutCopyMode = False Set Maildb = Nothing Set MailDoc = Nothing Set AttachME = Nothing Set EmbedObj = Nothing If WasOpen = 1 Then Set Session = Nothing ElseIf WasOpen = 0 Then Session.Close Set Session = Nothing End If MsgBox "The Line Down Email was sent", vbOKOnly End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel spreadsheet sending email based on cell formula | Excel Worksheet Functions | |||
Lotus notes link | Excel Discussion (Misc queries) | |||
excel close everytime I receive an email with lotus notes 6.5.5 | Excel Discussion (Misc queries) | |||
Why won't AOL email communicate with lotus notes email? | Excel Discussion (Misc queries) | |||
Sending e-mail with Lotus Notes pressing an excel button | Excel Discussion (Misc queries) |