Outlook Application Error

  • Thread starter Thread starter Oliver Scheiber
  • Start date Start date
O

Oliver Scheiber

Hi,
with this code(VB6) I receive an error message:
Dim objOutlook As Outlook.Application
Dim objOutSpace As Outlook.NameSpace
Dim objOutFolder As Outlook.MAPIFolder
Dim objOutCont As Outlook.ContactItem
Dim oItem As ListItem ' Listview-Control

Set objOutlook = New Outlook.Application
Set objOutSpace = objOutlook.GetNamespace("MAPI")
Set objOutFolder = objOutSpace.GetDefaultFolder(olFolderContacts)

If objOutFolder.Items.Count = 0 Then
MsgBox "No contacts in your folder!", vbInformation, ""
frmOutlookContacts.Picture1.SetFocus
Exit Function
Else
frmOutlookContacts.lstKontakte.ListItems.Clear
For Each objOutCont In objOutFolder.Items
If objOutCont.Class = olContact Then
If Len(objOutCont.LastName) And
Len(objOutCont.FirstName) > 0 Then
Set oItem =
frmOutlookContacts.lstKontakte.ListItems.Add(, , " " &
objOutCont.LastName & " " & objOutCont.FirstName)
End If
oItem.SmallIcon = "Kontakt"
If Len(objOutCont.BusinessAddressStreet) > 0 Then
oItem.SubItems(1) =
objOutCont.BusinessAddressStreet
End If
If Len(objOutCont.BusinessAddressPostalCode) > 0
Then
oItem.SubItems(2) =
objOutCont.BusinessAddressPostalCode
End If
If Len(objOutCont.BusinessAddressCity) > 0 Then
oItem.SubItems(3) =
objOutCont.BusinessAddressCity
End If
End If

Set oItem = Nothing
Set objOutCont = Nothing
Set objOutFolder = Nothing
Set objOutSpace = Nothing
Set objOutlook = Nothing


Outlook.exe Error-Message:
Outlook has a problem firmly placed and must be terminated.


Windows event-viewer message:
Ereignistyp: Fehler
Ereignisquelle: Application Error
Ereigniskategorie: Keine
Ereigniskennung: 1000
Datum: 01.11.2006
Zeit: 16:09:28
Benutzer: Nicht zutreffend
Computer: USER-BDEC581E83
Beschreibung:
Fehlgeschlagene Anwendung outlook.exe, Version 10.0.6626.0,
fehlgeschlagenes Modul mscorwks.dll, Version 1.1.4322.2032,
Fehleradresse 0x00071bd8.

Weitere Informationen über die Hilfe- und Supportdienste erhalten Sie
unter http://go.microsoft.com/fwlink/events.asp.
Daten:
0000: 41 70 70 6c 69 63 61 74 Applicat
0008: 69 6f 6e 20 46 61 69 6c ion Fail
0010: 75 72 65 20 20 6f 75 74 ure out
0018: 6c 6f 6f 6b 2e 65 78 65 look.exe
0020: 20 31 30 2e 30 2e 36 36 10.0.66
0028: 32 36 2e 30 20 69 6e 20 26.0 in
0030: 6d 73 63 6f 72 77 6b 73 mscorwks
0038: 2e 64 6c 6c 20 31 2e 31 .dll 1.1
0040: 2e 34 33 32 32 2e 32 30 .4322.20
0048: 33 32 20 61 74 20 6f 66 32 at of
0050: 66 73 65 74 20 30 30 30 fset 000
0058: 37 31 62 64 38 0d 0a 71bd8..


I use german windowsXP, officeXP and visual basic 6.

I have all updates.

Office repair did not help.

Any ideas?

Best regards Oliver.
 
No that's not possible. The error is not in my code, he was create
from the outlook.exe. My vb-project is a com-addin for ms-word and the
error is coming on the runtime.

I read the ms-outlook contacts into a Listview, after 3 seconds comes
the error.
 
Well, if it's not the code then Outlook is obviously crashing due to another
reason which I really can't determine. Sorry.
 
Anyway, you could try what Eric suggested: Run the Addin in debug mode and
see which line causes the error.

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
-- www.VBOffice.net --


Am 2 Nov 2006 01:32:24 -0800 schrieb Oliver Scheiber:
 
Back
Top