lotus Notes coding help

I

ifoundgoldbug

Greetings again

I have been setting up am Preventative maintence program at my place of
work and i have completed it now. BUT now that it is completed my Boss
would like to have all the PM's for the week automatically E-mailed to
him. the thing is we use lotus notes 7. i have seen this type of thing
done with outlook but i have never worked with noted and VBA.

The Fields and Tables I and tables I am working with are:

Table: Work Order

Fields: Tool #, PMDate, Scheduler, and PMScheduled

i will try to give as many specifics as i can. in pseudo code i think
it looks something like this.

IF PM report has been sent this week Then

Exit sub

Else

Run PmThisWeek Query

take data from query and get it into an e-mail and have it send
to the boss

mark some field to denote PM report has been sent this week

End If
 
S

Stefan Hoffmann

hi,

Greetings again
Greetings earthling.
I have been setting up am Preventative maintence program at my place of
work and i have completed it now. BUT now that it is completed my Boss
would like to have all the PM's for the week automatically E-mailed to
him. the thing is we use lotus notes 7. i have seen this type of thing
done with outlook but i have never worked with noted and VBA.

Function NotesEMail(vEmail As String, Optional vCopy As String, Optional
vBody As String, Optional vSubject As String)
'***************************************************************************
'e-Mails aus Access heraus versenden, Version 1.0
'geschrieben von D. Keller
'***************************************************************************

Dim session As Object
Dim notesdb
Dim doc
Dim YN
Dim notesrichtextitem

Set session = CreateObject("Notes.NotesSession")
Set notesdb = session.GETDATABASE("", "")

notesdb.OPENMAIL
Set doc = notesdb.CREATEDOCUMENT()
Set notesrichtextitem = doc.CREATERICHTEXTITEM("BODY")
doc.Form = "Memo"
doc.sendto = vEmail
doc.CopyTo = vCopy
doc.Subject = vSubject
doc.FROM = session.COMMONUSERNAME
doc.posteddate = Date
doc.body = vBody
'Call notesrichtextitem.EMBEDOBJECT(1454, "", "c:\sap\temp.rtf")
Call doc.Send(False)
doc.Save True, True

End Function

mfG
--> stefan <--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top