A Microsoft Outlook email forum. Outlook Banter

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.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Add-ins for Outlook
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Outlook crashes during shutdown after running operation



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old January 4th 07, 07:27 PM posted to microsoft.public.outlook.program_addins
[email protected]
external usenet poster
 
Posts: 2
Default Outlook crashes during shutdown after running operation

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  
Old January 4th 07, 08:14 PM posted to microsoft.public.outlook.program_addins
[email protected]
external usenet poster
 
Posts: 2
Default Outlook crashes during shutdown after running operation

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
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


All times are GMT +1. The time now is 09:18 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.