I am new in our Company's Division.
My new assignment is to retrieve emailed logs from applications running in our Company. We are currently using Microsoft Exchange Outlook.
Each application was given a different Mailbox and there are 10 Mailboxes assigned to me right now. No one was monitoring the emailed logs for - so long so there are more that 100,000 unread email log that are unopened.
The log formats are basically the same, I just have to look for an emailed log that is unique and print the exemptions.
Being new to Visual Basic
I used a code that just lists the messages of my default mailbox to a list box:
Dim i As Long
MAPISession1.DownLoadMail = True
MAPISession1.SignOn
MAPIMessages1.SessionID = MAPISession1.SessionID
MAPIMessages1.Fetch
If MAPIMessages1.MsgCount > 0 Then
For i = 0 To MAPIMessages1.MsgCount - 1
MAPIMessages1.MsgIndex = i
List1.AddItem "From:" & MAPIMessages1.MsgOrigDisplayName & _
" Subject:" & MAPIMessages1.MsgSubject
List1.AddItem MAPIMessages1.MsgNoteText
Next
End If
MAPISession1.SignOff
MsgBox "You have " & MAPIMessages1.MsgCount & _
" messages in your inbox!"
The code works fine but my problems are:
1. How can I retrieve not only from my default Mailbox but from other mailboxes?
2. When I populate the listbox the MsgNoteText has ascii characters in place of the spaces, tabs and next lines. How can I suppress these.
Thanks in advance.
Cheers
My new assignment is to retrieve emailed logs from applications running in our Company. We are currently using Microsoft Exchange Outlook.
Each application was given a different Mailbox and there are 10 Mailboxes assigned to me right now. No one was monitoring the emailed logs for - so long so there are more that 100,000 unread email log that are unopened.
The log formats are basically the same, I just have to look for an emailed log that is unique and print the exemptions.
Being new to Visual Basic
I used a code that just lists the messages of my default mailbox to a list box:
Dim i As Long
MAPISession1.DownLoadMail = True
MAPISession1.SignOn
MAPIMessages1.SessionID = MAPISession1.SessionID
MAPIMessages1.Fetch
If MAPIMessages1.MsgCount > 0 Then
For i = 0 To MAPIMessages1.MsgCount - 1
MAPIMessages1.MsgIndex = i
List1.AddItem "From:" & MAPIMessages1.MsgOrigDisplayName & _
" Subject:" & MAPIMessages1.MsgSubject
List1.AddItem MAPIMessages1.MsgNoteText
Next
End If
MAPISession1.SignOff
MsgBox "You have " & MAPIMessages1.MsgCount & _
" messages in your inbox!"
The code works fine but my problems are:
1. How can I retrieve not only from my default Mailbox but from other mailboxes?
2. When I populate the listbox the MsgNoteText has ascii characters in place of the spaces, tabs and next lines. How can I suppress these.
Thanks in advance.
Cheers