Zeile 4:Benutzerdefinierte Typ nicht definiert. Was ist zu tun?
Wie definiert man da: Outlook.Application
mfg
Wolfgang
Source:
Sub AdressenVonOutlook()
Dim workingFolder As Object
Dim i As Integer
Dim olMAPI As New Outlook.Application <- hier
Range("A2").Select
Set workingFolder = olMAPI.GetNamespace("MAPI").GetDefaultFolder(olFolderContacts)
For i = 1 To workingFolder.Items.Count
Set objItem = workingFolder.Items(i)
With objItem
ActiveCell.Value = .FirstName
ActiveCell.Offset(0, 1).Value = .LastName
ActiveCell.Offset(0, 2).Value = .BusinessAddress
ActiveCell.Offset(0, 3).Value = .Email1Address
ActiveCell.Offset(0, 4).Value = .HomeTelephoneNumber
ActiveCell.Offset(0, 5).Value = .BusinessTelephoneNumber
ActiveCell.Offset(0, 6).Value = .BusinessFaxNumber
ActiveCell.Offset(0, 7).Value = .Birthday
End With
ActiveCell.Offset(1, 0).Select
Next i
Set objItem = Nothing
Set olMAPI = Nothing
End Sub