A
Alan Silver
Hello,
I hope someone can help with this. I've searched Google but not found
any answer.
I have a VB case management application which runs as a client
application against an SQL server. One of the tasks is that the user can
log receipt of an e-mail. I do this by showing a list of all e-mails in
their InBox and allowing them to choose one, along with any attachments
it may have. The details of the e-mail, body text and attachments are
then saved to a central server. The relevant code for reading the InBox
is (simplified) :-
Dim omOutlook As Outlook.Application
Dim omInBox As Outlook.MAPIFolder
Dim olMailItem 'As Outlook.MailItem
Dim nlRow As Long
Set omOutlook = New Outlook.Application
Set omInBox = omOutlook.GetNamespace("MAPI").GetDefaultFolder(olFolderInbox)
For nlRow = 1 To omInBox.Items.Count
With omInBox.Items(nlRow)
' add e-mail details to display grid
End With
Next
Now this was working fine for ages. Just recently, they experienced
problems with Outlook and the system Admin set up new personal folders
for all of them. Since then, whenever they try to log an e-mail, the
list is empty. Despite having e-mails in the InBox, nothing shows up in
the list.
So, any ideas how to get around this ? Any advice appreciated.
I hope someone can help with this. I've searched Google but not found
any answer.
I have a VB case management application which runs as a client
application against an SQL server. One of the tasks is that the user can
log receipt of an e-mail. I do this by showing a list of all e-mails in
their InBox and allowing them to choose one, along with any attachments
it may have. The details of the e-mail, body text and attachments are
then saved to a central server. The relevant code for reading the InBox
is (simplified) :-
Dim omOutlook As Outlook.Application
Dim omInBox As Outlook.MAPIFolder
Dim olMailItem 'As Outlook.MailItem
Dim nlRow As Long
Set omOutlook = New Outlook.Application
Set omInBox = omOutlook.GetNamespace("MAPI").GetDefaultFolder(olFolderInbox)
For nlRow = 1 To omInBox.Items.Count
With omInBox.Items(nlRow)
' add e-mail details to display grid
End With
Next
Now this was working fine for ages. Just recently, they experienced
problems with Outlook and the system Admin set up new personal folders
for all of them. Since then, whenever they try to log an e-mail, the
list is empty. Despite having e-mails in the InBox, nothing shows up in
the list.
So, any ideas how to get around this ? Any advice appreciated.