change in code.... but not really working

Prayder

Registered User.
Local time
Today, 10:47
Joined
Mar 20, 2013
Messages
303
I was hoping someone could explain exactly what is happening here with this procedure.
Code:
Public Function OPEN_SESSION() As Boolean
Dim objSession As Object
Dim strServer As String
Dim strMailFile As String
'Outlook must be open for module to work correctly
If MsgBox("Do you have Outlook running?", vbCritical + vbYesNo, "Warning!") = vbYes Then
'this code must be left out of the loop so that only one session is started
Set objSession = CreateObject("Notes.NOTESSESSION")
strServer = objSession.GETENVIRONMENTSTRING("mailserver", True)
strMailFile = objSession.GETENVIRONMENTSTRING("mailfile", True)
Set mobjDB = objSession.GETDATABASE(strServer, strMailFile)
OPEN_SESSION = True
Else
MsgBox "Please start Outlook and try again.", vbOKOnly, "Emails"
OPEN_SESSION = False
End If
End Function

I changed out the

Set objSession = CreateObject("Notes.NOTESSESSION")

with

DoCmd.SendObject acSendNoObject, , , , , , "Clarification for PO", "Please Clarify reason for PO:", , True

And I deleted:

strServer = objSession.GETENVIRONMENTSTRING("mailserver", True)
strMailFile = objSession.GETENVIRONMENTSTRING("mailfile", True)
Set mobjDB = objSession.GETDATABASE(strServer, strMailFile)

but for some reason my form is not updating after sending the email.
 
It looks like this function was supposed to open a session of Lotus Notes and return a value to indicate if that succeeded.

This routine has nothing to do with updating a form, that I can see.

Hope this helps,
 

Users who are viewing this thread

Back
Top Bottom