Hi,

In outlook I have my inbox, as well as a shared inbox. I have some vba code to export emails from the shared inbox to a windows folder. That part works great. However the last part of the macro then deletes these emails. The issue is the macro is deleting the emails in the shared inbox and putting them into my inbox's deleted items instead of the the shared inbox deleted items. Im wondering if anyone can help me...Current code is:

' Deletes messages in folder
total_messages = objFolder.Items.Count
For i = 1 To total_messages
message_index = total_messages - i + 1
Set oMessage = objFolder.Items.Item(message_index)
oMessage.Delete
Set oMessage = Nothing
Next

Thanks!