ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Outlook VBA Problem (https://www.excelbanter.com/excel-programming/448854-outlook-vba-problem.html)

kundro

Outlook VBA Problem
 

Hallo NG ,
bin Anfänger was VBA betrifft und schon vorab
Danke für jede Hilfestellung. Hier mein Problem
und dazu der Code.

Ich habe im Ordner Kontakte ein Benutzedefiniertes
Feld mit Namen "Styp" erstellt und Ihr für bestimmte
Kontakte den Wert "1" zugewiesen. Wenn ich das Makro
starte werden mir die ersten 4 Kontakte ( die im Feld
Styp mit Wert 1 belegt sind ) angezeigt aber anschließend
kommt die Fehlermeldung "Laufzeitfehler 91" ; Objejtvariable
nicht definiert. Kann jemand helfen ?
Danke nochmal und Gruß
Kundro


Sub CheckCurItem()

Dim olApp As Outlook.Application
Dim olNms As Outlook.NameSpace
Dim kontk As Object
Dim kon As Outlook.ContactItem

Set olApp = CreateObject("Outlook.Application")
Set olNms = olApp.GetNamespace("MAPI")
Set kontk = olNms.GetDefaultFolder(olFolderContacts).Items

For Each kon In kontk
If kon.UserProperties("Styp").Value = 1 Then
kon.Display
End If
Next

End Sub


Claus Busch

Outlook VBA Problem
 
Hallo,

Am Sat, 08 Jun 2013 11:52:08 +0200 schrieb kundro:

bin Anfänger was VBA betrifft und schon vorab
Danke für jede Hilfestellung. Hier mein Problem
und dazu der Code.


du bist hier in der englischsprachigen Excel-Newsgroup
Stell deine Frage bitte hier:
http://answers.microsoft.com/de-de/office/forum/outlook


Regards
Claus Busch
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2

Charlotte E.[_3_]

Outlook VBA Problem
 
I'm not really sure, what you're asking (don't understand German that
well), but perhaps you can find help he

http://www.EXCELGAARD.dk/Lib/Outlook/

CE


Den 08.06.2013 11:52, kundro skrev:

Hallo NG ,
bin Anfänger was VBA betrifft und schon vorab
Danke für jede Hilfestellung. Hier mein Problem
und dazu der Code.

Ich habe im Ordner Kontakte ein Benutzedefiniertes
Feld mit Namen "Styp" erstellt und Ihr für bestimmte
Kontakte den Wert "1" zugewiesen. Wenn ich das Makro
starte werden mir die ersten 4 Kontakte ( die im Feld
Styp mit Wert 1 belegt sind ) angezeigt aber anschließend
kommt die Fehlermeldung "Laufzeitfehler 91" ; Objejtvariable
nicht definiert. Kann jemand helfen ?
Danke nochmal und Gruß
Kundro


Sub CheckCurItem()

Dim olApp As Outlook.Application
Dim olNms As Outlook.NameSpace
Dim kontk As Object
Dim kon As Outlook.ContactItem

Set olApp = CreateObject("Outlook.Application")
Set olNms = olApp.GetNamespace("MAPI")
Set kontk = olNms.GetDefaultFolder(olFolderContacts).Items

For Each kon In kontk
If kon.UserProperties("Styp").Value = 1 Then
kon.Display
End If
Next

End Sub



All times are GMT +1. The time now is 08:51 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com