Consulting

Results 1 to 2 of 2

Thread: Move emails to Shard mailbox folders based on contacts

  1. #1
    VBAX Newbie
    Joined
    Dec 2016
    Posts
    1
    Location

    Move emails to Shard mailbox folders based on contacts

    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.
    Attached Files Attached Files

  2. #2
    VBAX Mentor skatonni's Avatar
    Joined
    Jun 2006
    Posts
    347
    Location
    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")
    To debug, mouse-click anywhere in the code. Press F8 repeatedly to step through the code. http://www.cpearson.com/excel/DebuggingVBA.aspx

    If your problem has been solved in your thread, mark the thread "Solved" by going to the "Thread Tools" dropdown at the top of the thread. You might also consider rating the thread by going to the "Rate Thread" dropdown.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •