Ich suche schon seit langem eine VBA Befehl mit dem ich bei einen selektierten Outlook Kontakt z.B. die Telefonnummer .BusinessTelephoneNumber auslesen kann?
Irgendwie fehlt mir die zündende Idee ;-(
Danke für Eure Hilfe.
Stefan
Public Sub OLU01_GetItemsxxFolderPath()
Dim obj As Object
Dim F As Outlook.MAPIFolder
Dim guck As Outlook.Explorer
Dim x As Long
Dim Msg$
Set obj = Application.ActiveWindow
If TypeOf obj Is Outlook.Inspector Then
Set obj = obj.CurrentItem
Else
Set obj = obj.Selection(1) 'aktuelles Item
End If
Set F = obj.Parent
Msg = "The Path of this email is: " & vbCrLf _
& F.FolderPath & vbCrLf & vbCrLf
Msg = Msg & "The Path is copied into the clipboard always. " & vbCrLf
Msg = Msg & "Open a separate Folder-View for this mail?" & vbCrLf
If MsgBox(Msg, vbYesNo) = vbYes Then
Set guck = F.GetExplorer
guck.Height = 650
guck.Width = 1200
' Application.SendKeys ("%F4")
guck.Display
' Application.SendKeys ("^6")
x = x
' damit würde er kein neues Fenster öffnen, sondern im alten positionieren
Set Application.ActiveExplorer.CurrentFolder = F
End If
' in die Zwischenablage kopieren
Dim objClip As DataObject
Set objClip = New DataObject
strTMP = F.FolderPath
objClip.SetText strTMP
objClip.PutInClipboard
End Sub