I have an extensive script I have been working on that reads a bunch of data from Exchange for analysis/reporting. I have been debugging and testing it for a while. As of this afternoon, it began kicking out an error with the data in the subject for some reason. It was not doing this previously, it was outputting data before. I had seen it have this error before, but it was occasional only. The logic that it uses in the MAPI session to attach to exchange has not changed. I am basically grabbing data from users default calendars and looking for appointment items.
Anyway, I am baffled as to why this would start happening. Any ideas? Below is the excerpt of code:
There is a lot more before and after. All the variables are filled in correctly, but it gets the error on the last line I posted. The strComputerName is the name of the exchange server and the strMailBox is the usernme of a user. As I said, it had happened occasionally before, but now thats all it does. Any ideas?
Anyway, I am baffled as to why this would start happening. Any ideas? Below is the excerpt of code:
Code:
Function GetApptData(strComputerName,strMailBox,strUser)
Dim objSession, strProfileInfo, objAppointment, strAttendees, Attendee
Dim objAppointmentItems, objFolder
strProfileInfo = strComputerName & vbLf & strMailBox
Set objSession = CreateObject("MAPI.Session")
objSession.Logon "", "", False, True, 0, True, strProfileInfo
strMailBox = ""
Set objFolder = objSession.GetDefaultFolder(CdoDefaultFolderCalendar)
There is a lot more before and after. All the variables are filled in correctly, but it gets the error on the last line I posted. The strComputerName is the name of the exchange server and the strMailBox is the usernme of a user. As I said, it had happened occasionally before, but now thats all it does. Any ideas?