codequest
asked on
Controlling LN email with VBA
I've got an MS Access DB that sends and tracks LN emails. Right now it works only by sending emails from my account, i.e., the one associated with my LN client login on my machine.
I would like to do these functions using a group mail box for which I have admin rights.
So the question is how to redirect (and or control the) access to another Lotus Notes inbox via VBA...
Testing the process of checking the inbox, and even with a hard coded .NSF file and server, it still points to default inbox.
========================== ========== ========== ========== ========== ========== ========== ========== =====
This is the current code which looks at the users inbox: Need the ability to point to a different inbox
Set mSession = CreateObject("Notes.NotesS ession")
UserName = mSession.UserName
MailDbName = Left$(UserName, 1) & Right(UserName, (Len(UserName) - InStr(1, UserName, " "))) & ".nsf"
Set Maildb = mSession.GETDATABASE("", MailDbName)
Maildb.OPENMAIL
Set NotesDocs = Maildb.GETVIEW("($Inbox)")
Set MailDoc = NotesDocs.GETLASTDOCUMENT
Any help with this would be appreciated.
Thanks!
I would like to do these functions using a group mail box for which I have admin rights.
So the question is how to redirect (and or control the) access to another Lotus Notes inbox via VBA...
Testing the process of checking the inbox, and even with a hard coded .NSF file and server, it still points to default inbox.
==========================
This is the current code which looks at the users inbox: Need the ability to point to a different inbox
Set mSession = CreateObject("Notes.NotesS
UserName = mSession.UserName
MailDbName = Left$(UserName, 1) & Right(UserName, (Len(UserName) - InStr(1, UserName, " "))) & ".nsf"
Set Maildb = mSession.GETDATABASE("", MailDbName)
Maildb.OPENMAIL
Set NotesDocs = Maildb.GETVIEW("($Inbox)")
Set MailDoc = NotesDocs.GETLASTDOCUMENT
Any help with this would be appreciated.
Thanks!
Tried this solution with the same results. Resolved w/approach: Instead of separate db-Created a sub folder, and added a rule to post incoming emails to new folder, then parsed folder
ASKER
sjef_bosman: thanks for input
jwtchdev and I discussed this offline; I accept his solution.
jwtchdev and I discussed this offline; I accept his solution.
Not really "correct", now is it? Next time you take a discussion off-line, be open about it. Anyway, it's against EE-rules (!) but in some cases it can't be avoided.
At least you owe us the outcome of the discussion, can you present it here?
At least you owe us the outcome of the discussion, can you present it here?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I don't really understand, but if it works for you, no problem.
There seems to be a misunderstanding, maybe even mine: you talked about "using a group mail box", from that I understood that you share one database with multiple people, and that database has a fixed name, which is why I suggested not to use the user's name to fetch the mail database name but to use a fixed name. As I said, there's no problem when it works for you :-)
There seems to be a misunderstanding, maybe even mine: you talked about "using a group mail box", from that I understood that you share one database with multiple people, and that database has a fixed name, which is why I suggested not to use the user's name to fetch the mail database name but to use a fixed name. As I said, there's no problem when it works for you :-)
Open in new window
use a fixed name likeOpen in new window