PDA

View Full Version : Move emails to Shard mailbox folders based on contacts



WINTHUYA
12-04-2016, 11:46 PM
Hi,

This is my first post here and let me introduce myself first. I'm a system engineer handling Microsoft AD and Exchange Server. I'm not a programmer and very limited knowledge in programming. But the situation come to me to work on that becasue there is no one else to do.
Here is my scenario.
We are migrating Public Folders to Shared Mailboxes and facing some challences. One of departments use public folders heavily and there is a dedicated PC for moving emails to respective folders based on contacts using a VBA script.. I already created Shared folders with same name as public folders as the preparation of migration.
Now it's the time to modify the script to move to shared mailbox instead of Public folders.
Below is the existing script and want to modify if.
Can someone advice me how to handle it.
Thanks in advanced and really appreciate it.

skatonni
01-10-2017, 02:43 PM
If you have set up shared mailbox folders to match then



Set ContactFolder = ObjMAPI.Folders("Public Folders").Folders("All Public Folders").Folders("Vessel COM").Folders("Vessel COM Contacts")


might be changed to



Set rootFolder = ObjMAPI.Folders("Public Folders").Folders("All Public Folders")
Set ContactFolder = rootFolder.Folders("Vessel COM").Folders("Vessel COM Contacts")


Once you change all the places with a public folder reference and this looks like it is working then



Set rootFolder = ObjMAPI.Folders("Name of Shared Mailbox").Folders("Inbox")