Hi,

I created a VB.NET add-in for the ms office applications word, excel and outlook. It creates a toolbar with one button which displays a dialog to store the document in a database. I use VB.NET version 1.1 (2003) and office 2000.

It works fine when i use the .Show() method on te userform but crashes when i use the .ShowDialog() method. It actually works the first time but crashes the second time AFTER (???) the method has correctly completed. Something with closing the form again i think...

This is the exact error message: "The exception unknown software exception (0xc015000f) occurred in the application at location 0x77f457b5."Anyone knows what I could be doing wrong?Below my code with the call...

Also I'm having problems debugging. In word and excel it works but outlook just closes on opening without hitting the OnConnection method. Anyone knows what to try?

Thanks in advance
Koen

-------------------------------------
VB Code:
  1. Private Shared Sub UploadDocument_Click(ByVal sender As CommandBarButton, ByRef cancel As Boolean) Handles m_Button.Click
  2.   Try
  3.     GenericOfficeApplicationHelper.CheckActiveDocument()
  4.  
  5.     Dim uploadForm As New UploadForm
  6.     Dim result As DialogResult
  7.  
  8.     result = uploadForm.ShowDialog()
  9.  
  10.     If result = DialogResult.OK Then
  11.  
  12.       GUIHelper.ShowMessageBox("Document successfully uploaded", MessageBoxIcon.Information)
  13.     End If
  14.  
  15.   Catch ex As Exception
  16.     GUIHelper.ShowMessageBox("Error: " & ex.Message, MessageBoxIcon.Error)
  17.   End Try
  18. End Sub