Hallo zusammen
Ich habe ein Problem mit den Kontakteinträgen im Outlook. Wenn ich mit dem iPhone einen Kontakt erstelle, wird er als Name, Vorname abgelegt, obwohl ALLE Einstellungen anders lauten. Muss wohl ein Problem mit Zimbra sein.
Ich wollte nun eine VBA-Routine schreiben, die mir das Feld "Name" in den Outlook-Kontakten frisch nach den Inhalten FirstName LastName füllt. Da ich nicht der VBA-Profi bin, komme ich nun aber nicht weiter. Jeweils beim zweiten Durchgang bricht er mir ab. Hat jemand eine Idee, was ich falsch programmiert habe?
Danke
Sub neubenennen()
Dim olExplorer As Explorer
Dim olfolder As MAPIFolder
Dim olSelection As Selection
Set olExplorer = Application.ActiveExplorer
Set olfolder = Application.ActiveExplorer.CurrentFolder
Set olSelection = olExplorer.Selection
Anzahl = Outlook.ActiveExplorer.CurrentFolder.Items.Count
For x = 1 To Anzahl
SName = olSelection.Item(x).FirstName & " " & olSelection.Item(x).LastName
olSelection.Item(x).FileAs = SName
olSelection.Item(x).FullName = SName
olSelection.Item(x).Save
Next x
End Sub
|