+ Reply to Thread
Results 1 to 5 of 5

VBA to move email from inbox to subfolder

  1. #1
    Forum Contributor
    Join Date
    12-18-2012
    Location
    Netherlands
    MS-Off Ver
    Excel 365
    Posts
    108

    VBA to move email from inbox to subfolder

    Hi,

    I have a very basic code that helps me move selected emails from the Inbox to a subfolder, but it will not move it.
    My VBA keeps telling me the folder (ToDo) does not exist, but that is likely because it is a subfolder, and it is not directly listed underneath the mailbox.

    The structure of the mailbox is setup like this:
    - Mailbox - Marijke
    - Inbox
    --> subfolder of inbox: Today
    --> subfolder of Today: ToDo

    This is part of the code I have where the mailfolder is selected:

    Please Login or Register  to view this content.
    Can anyone help me obtain the code I need to move my emails?

    Thank you!

  2. #2
    Forum Expert
    Join Date
    02-14-2009
    Location
    .
    MS-Off Ver
    ................
    Posts
    2,840

    Re: VBA to move email from inbox to subfolder

    It would be more effective to define an Outlook rule to move emails as they are received, if you can identify which messages are to be moved.

    You haven't included the code which determines which to move, so this is a comment only.

  3. #3
    Forum Contributor
    Join Date
    12-18-2012
    Location
    Netherlands
    MS-Off Ver
    Excel 365
    Posts
    108

    Re: VBA to move email from inbox to subfolder

    I have considered doing this, but we have so many emails coming in that need grooming that we have reached the maximum number of rules.

    The macro itself works.
    if I put a different folder in (for example 'Sent') it moves the email. it's just with the way the subfolder is positioned that seems to be my challenge.

    This is the complete code I have:

    Please Login or Register  to view this content.

  4. #4
    Forum Contributor
    Join Date
    08-27-2006
    Posts
    136

    Re: VBA to move email from inbox to subfolder

    Walk the chain of folders, the same as opening folders manually.

    Please Login or Register  to view this content.
    To mark "Solved" go to Thread Tools.

  5. #5
    Forum Contributor
    Join Date
    12-18-2012
    Location
    Netherlands
    MS-Off Ver
    Excel 365
    Posts
    108

    Re: VBA to move email from inbox to subfolder

    Thank you skatonni, your solution worked perfectly!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 14
    Last Post: 09-18-2016, 08:13 AM
  2. Replies: 0
    Last Post: 09-18-2015, 03:20 AM
  3. VBA code needed to move from Outlook 2010 subfolder to Symantec Vault subfolder
    By Marijke in forum Outlook Programming / VBA / Macros
    Replies: 1
    Last Post: 01-09-2014, 12:14 PM
  4. Move categorized email from Inbox to a subfolder named exactly as the category
    By lennasaurus in forum Outlook Formatting & Functions
    Replies: 0
    Last Post: 11-20-2013, 03:24 AM
  5. [SOLVED] Mkdir command button to add subfolder/subfolder
    By frefry4 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 07-17-2013, 06:28 PM
  6. Moving an e-mail from a subfolder in Mailbox to the equivalent subfolder in an archive PST
    By johncassell in forum Outlook Programming / VBA / Macros
    Replies: 0
    Last Post: 07-09-2012, 11:31 AM
  7. Move Inbox Subfolder Items by Category to Folder
    By ker9 in forum Outlook Programming / VBA / Macros
    Replies: 4
    Last Post: 08-30-2011, 02:03 PM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1