Outlook !!!!
Denne kode kan læse hvad der er i den mail man har makeret i Outlook og den kan læse hvad Emnet på mailen er... MEN jeg mangler at kunne se Mail adressen på den mail der er makeret i Outlook....Private Sub GetSelectedItem_Click()
\' This uses an existing instance if available (default Outlook behavior).
Dim oApp As New Outlook.Application
Dim oExp As Outlook.Explorer
Dim oSel As Outlook.Selection \' You need a selection object for getting the selection.
Dim oItem As Object \' You don\'t know the type yet.
Set oExp = oApp.ActiveExplorer \' Get the ActiveExplorer.
Set oSel = oExp.Selection \' Get the selection.
For i = 1 To oSel.Count \' Loop through all the currently .selected items
Set oItem = oSel.Item(i) \' Get a selected item.
DisplayInfo oItem \' Display information about it.
Next i
End Sub
Sub DisplayInfo(oItem As Object)
Dim oMailItem As Outlook.MailItem
strMessageClass = oItem.MessageClass
If (strMessageClass = \"IPM.Note\") Then \' Mail Entry.
Set oMailItem = oItem
MsgBox oMailItem.Subject
MsgBox oMailItem.Body
End If
End Sub
Her er Microsofts Hjælpe side:
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q240935
Håber virkelig der er nogle der kan hjælpe....
