| | #1 | |
| Registered User Registriert seit: May 2009 Karma: 10 | Outlook VBA Hallo, ich möchte in Outlook 2010 die Anzahl meiner Adressbuch- Einträge zählen lassen, und diese dann in einer Userform anzeigen. Ich habe nun folgenden Code entwickelt: Code: Sub AdressData() Dim ol As New Outlook.Application Dim olns As Outlook.NameSpace Dim cf As Outlook.MAPIFolder Dim c As Outlook.ContactItem Dim objItems As Outlook.Items Dim Prop As Outlook.UserProperty Set cf = olns.GetDefaultFolder(olFolderContacts) Set objItems = cf.Items iNumContacts = objItems.Count UserForm1.TextBox1.Text = Str(iNumContacts) End Sub Private Sub Beenden_Click() End End Sub Private Sub Suche_Click() AdressData End Sub Anzahl der Einträge erscheinen, das mache ich durch " iNumContacts = objItems.Count". Wenn dich den Code jetzt ausführe, bekomme ich folgende Fehlermeldung: Zitat:
Hat jemand Rat für mich? | |
| | |
| | #2 |
| Moderator Registriert seit: Jan 2001 Karma: 328 | Re: Outlook VBA Ich kann's gerade nicht testen, aber versuche mal, den Namespace vorher mit set zuzuweisen Set olns = ol.GetNamespace("MAPI") Set cf = olns.GetDefaultFolder(olFolderContacts) --- ggf. cf anders deklarieren: Dim cf As Outlook.Folder |
| | |
![]() |
| Aktive Benutzer in diesem Thema: 1 (Registrierte Benutzer: 0, Gäste: 1) | |
| Themen-Optionen | |
| Ansicht | |
|
|
Ähnliche Themen | ||||
| Thema | Autor | Forum | Antworten | Letzter Beitrag |
| Outlook 6 | neon | Windows | 5 | 16.01.2002 20:12 |
| outlook | damien022 | Windows | 1 | 12.10.2001 19:06 |
| Automatische Antwort von Outlook Express oder Outlook | navti | Technisches Off-Topic | 5 | 24.09.2001 15:38 |
| Outlook /Outlook Express und VB-Script | UncleDago | Windows | 3 | 24.04.2001 09:29 |
| VBScript in Outlook/Outlook Express | UncleDago | VisualBasic / VBScript | 2 | 23.04.2001 22:18 |
Alle Zeitangaben in WEZ +2. Es ist jetzt 18:43 Uhr.






Linear-Darstellung

