![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
I have a COM addin (VB6), that had run without error until recently.
When the following code is run, the microsoft error reporting window comes up when outlook is closing after the onBeginShutdown and after the onDisconection events. Private Sub ExecuteButton_Click() ' Code renames two archive folders on in a pst file and one in the public folders. On Error Resume Next If Utilities.connected = False Then MsgBox ("You need to be connected to Exchange to use this feature.") Exit Sub End If Dim prospectName As String Dim customerName As String prospectName = ProspectList.Text customerName = CustomerList.Text Dim publicFolder As Redemption.RDOFolder Set publicFolder = MAPIFunctions.getRDOFolderPublic 'gets reference created at addin load. Set publicFolder = publicFolder.Folders("History") Set publicFolder = publicFolder.Folders(Utilities.getUserName) ' function from Sue Mosher's Outlook Programming book (gets name from root store name 'If Not publicFolder.Folders(prospectName) Is Nothing Then Set publicFolder = publicFolder.Folders(prospectName) 'End If If publicFolder Is Nothing Then Set publicFolder = MAPIFunctions.getRDOFolderPublic.Folders("History" ).Folders(Utilities.getUserName).Folders.Add(prosp ectName) 'gets reference created at addin load. End If Dim archiveFolder As Redemption.RDOFolder Set archiveFolder = MAPIFunctions.getRDOFolderArchive.Folders(prospect Name) 'gets reference created at addin load. If archiveFolder Is Nothing Then Set archiveFolder = MAPIFunctions.getRDOFolderArchive 'gets reference created at addin load. Set archiveFolder = archiveFolder.Folders.Add(prospectName) End If If Not publicFolder Is Nothing Then publicFolder.name = customerName End If archiveFolder.name = customerName Set publicFolder = Nothing Set archiveFolder = Nothing Unload Me End Sub I can load the form and click on the exit command, and I don't get an error. I have spent many hours, but I cannot find any problems. The onDisconnection event fires, and all objects are set to nothing, but I cannot find the problem. The specific error is: Unhandled exception at 0x66021883 in OUTLOOK.EXE: 0xC0000005: Access violation reading location 0x00000008. Thanks for any help. |
Ads |
#2
|
|||
|
|||
![]()
I think that I found a work-around. If I run the code to get the user's
name when the addin loads, and store it in a variable, and then access the variable when I need the user's name, Outlook does not crash upon closing. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Outlook will not re-start after incorrect shutdown. | Scrumpy Jack | Outlook - Installation | 3 | July 6th 06 09:26 PM |
Outlook 2003 will close but not shutdown | [email protected] | Outlook - General Queries | 1 | June 6th 06 09:42 PM |
outlook shutdown | [email protected] | Outlook - General Queries | 1 | April 26th 06 02:06 AM |
Outlook XP Auto-shutdown Error | Cerulean | Outlook - General Queries | 0 | February 9th 06 04:49 AM |
Outlook Shutdown - command line | Pete | Outlook - Installation | 1 | February 7th 06 08:28 PM |