Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Outlook to Lotus Notes 1

Status
Not open for further replies.

flaviooooo

Programmer
Feb 24, 2003
496
FR
Hello,

in a few weeks we are going to switch from Outlook to Lotus Notes as our mailing platform. A couple of our Access-databases used Outlook to 'automatically' mail out PDF files. Does anyone here have experience doing this with Lotus?

The code I currently use to mail is this:

Dim appOutLook As Object
Dim MailOutLook As Outlook.MailItem
Set appOutLook = CreateObject("Outlook.Application")
Set MailOutLook = appOutLook.CreateItem(olMailItem)
With MailOutLook
.TO = "" & Me.mailto & ""
.CC = "" & Me.mailcc & ""
.subject = "Delivery-Schedule " & Me.Combo0 & ""
.HTMLBody = ""
.Attachments.Add "C:\Delivery-Schedule.pdf", olByValue, 1, "Delivery-Schedule.pdf"
.Display
End With


I hope someone can help me with this?

Thanks in advance
 
Do a keyword search in this forum for maildoc

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
I believe the 5-star post is...
Linking Access with Lotus Notes - please help! This article actually shows how to send email via Notes.

You may want to grab the NotesSQL driver (ODBC tool that allows you link to Notes views)
NotesSQL 2.06 Driver for Notes

In addition to the Access forums, you can also try the Notes forum...
Lotus: NotesDesigner Forum

And lastly, this is LesPaul's (Leslie) line of expertize.

Richard
 
I ran accross this code while attempting to change over from Outlook to Lotus. Works great.

Add this to a module and call this routine from a command.

I automatically send emails based on certain criteria that are met within a QUERY.




Public Sub modEmail()

Dim Maildb As Object
Dim UserName As String
Dim MaildbName As String
Dim MailDoc As Object
Dim Session As Object
Dim AttachME As Object
Dim EmbedObj As Object

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
Else
Maildb.OPENMAIL
End If

Dim To(5) As Variant

To(0) = "Enter recipients email address here"
To(1) = "Enter recipients email address here"
To(2) = "Enter recipients email address here"
To(3) = "Enter recipients email address here"
To(4) = "Enter recipients email address here"
To(5) = ""

Dim cc(5) As Variant

cc(0) = "Enter CC: recipients here"
cc(1) = "Enter CC: recipients here"
cc(2) = "Enter CC: recipients here"
cc(3) = "Enter CC: recipients here"
cc(4) = "Enter CC: recipients here"
cc(5) = "Enter CC: recipients here"

Set MailDoc = Maildb.CreateDocument
MailDoc.Form = "Memo"
MailDoc.SendTo = To
MailDoc.CopyTo = cc
MailDoc.Subject = "ACCESS DB SENDING EMAIL TEST"
MailDoc.Body = "Hello " & "All" & _
vbCrLf & vbCrLf & _
"This notification is to determine system integrity. Please disregard." & _
vbCrLf & vbCrLf & _
"Thank you." & _
vbCrLf & vbCrLf & _
"JOHN DOE" & _
vbCrLf & _
"TEST 1.001"
MailDoc.SaveMessageOnSend = "SaveIt"

If Attachment <> "" Then
Set AttachME = MailDoc.CREATERICHTEXTITEM("Attachment")
Set EmbedObj = AttachME.EMBEDOBJECT(1454,"",Attachment,"Attachment")
End If

MailDoc.PostedDate = Now()
MailDoc.Send 0, Recip

Set Maildb = Nothing
Set MailDoc = Nothing
Set Session = Nothing
Set AttachME = Nothing
Set EmbedObj = Nothing

End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top