jkfeagle
Codus Confusious
- Local time
- Today, 10:22
- Joined
- Aug 22, 2002
- Messages
- 166
I am trying to send out an eMail and attachment through Notes and when I used this code the first few times it worked. Now it keeps indicating that there isn't a session running when there is. I even checked to see if it was getting a value for UserName and MailDBName and it is. When I try the code to force open a session it doesn't work right on our network so I opted not to do that. Anybody have any ideas? Here is the session code below:
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)
'Set UIDocument = UIWorkspace.EDITDOCUMENT(True)
If MailDB.ISOPEN = True Then
'Already open for mail
Else
MsgBox ("You must first open Lotus Notes to send the Daily Report")
GoTo Bailout
End If
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)
'Set UIDocument = UIWorkspace.EDITDOCUMENT(True)
If MailDB.ISOPEN = True Then
'Already open for mail
Else
MsgBox ("You must first open Lotus Notes to send the Daily Report")
GoTo Bailout
End If