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!

Selecting Group MailBox with VBA

Status
Not open for further replies.

MikeC14081972

Programmer
May 31, 2006
137
GB
Hi,

I've built a module in Access 2000 which generates emails in Notes 6.5.5 The emails are currently being created in the users draft folder as they require checking prior to sending.

My question is how do I get them to be generated in the drafts folder of a group mailbox that the user has access to??????

The code I'm using is

Code:
Dim objNotesDB as object
Dim objNotesDoc sd object
dim objNotes Session as object
dim objNotesRTF as object

set objNotesSession = CreateObject ("Notes.NotesSession")
set objNOtesDB = objNotesSession.GetDatabase("","")

objNotesDB.OPENMAIL

set objNotesDoc = objNotesDB.CreateDocument
objNotesDoc.ReplaceItemValue "SendTo", "me@domain.co.uk"
objNotesDoc.ReplaceItemValue "Subject", "Test"

'***** Build Message *****

objNotesDoc.SaveMessageOnSend = True
objNotesDoc.Save True, True

Thanks in advance I'm pulling my hair out over this one.

Mike.

If you make something idiot proof - They'll Only make a better idiot!!!
 
Have now worked it out.

Change the line to

Code:
set objNotesDB = onjNotesSession.GetDatabase ("<Server Name>","<.nsf Name>")

and remove the line

Code:
objNotesDB.OPENMAIL

If you make something idiot proof - They'll Only make a better idiot!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top