none
Moving multiple Outlook messages from search results to a folder RRS feed

  • Question

  • Hi,

    I'm facing the following issue: after I have searched for Outlook (2003) messages in Windows 7 using 'kind:email... <query>" I get a search results window. From there I can select ONE message and right-click, and get a number of options among which 'copy to folder' and 'move to folder'. But if I select multiple messages I only get 'copy' and 'delete.'

    I was wondering whether it would be feasible to write a PowerShell script that would get the multiple messages[' references] from the clipboard and perform a 'move to folder' action for all of them at once.

    This is very common use case for me when I tidy up my Inbox and Sent Items folders.

    TIA for your help.

    Thursday, January 12, 2012 12:55 PM

Answers

All replies

  • You might be interested in below article using the Move Method:

     

    http://msdn.microsoft.com/en-us/library/aa220127%28v=office.11%29.aspx

     

    Hope this helps,

     


    Daniel van den Berg | Washington, USA | "Anticipate the difficult by managing the easy"
    • Proposed as answer by danishaniModerator Wednesday, January 18, 2012 7:17 PM
    • Unproposed as answer by sba Wednesday, January 18, 2012 8:01 PM
    Thursday, January 12, 2012 11:57 PM
    Moderator
  • Could be a starting point, but does not fit my bill as I have two specific requirements:

     

    - I first find the messages using an advanced search such as "kind:email from:x to:y NOT has:attachment NOT folder:Z" (something you cannot do AFAIK using Outlook 2003's Advanced Find)

    - I want to manually select a subset from the results of the above query, and move only these messages to the target folder -- IOW not all messages returned by the query

     

    Do you think there would be a means in VBA to read the clipboard contents generated by Windows Explorer when one does a "copy" in a Search Results window, and from there get a collection of Outlook.Items objects?

     

    Wednesday, January 18, 2012 8:01 PM
  • Maybe you can use the Advanced Search option in VBA, using below thread in combination with the .Move method:

    http://support.microsoft.com/default.aspx?scid=kb;en-us;326244

     

    Allthough, your second requirement will not met, maybe you can adjust your query, to narrow down the search.

    In that case no manual action is necessary.

     

    Hope this helps,

     


    Daniel van den Berg | Washington, USA | "Anticipate the difficult by managing the easy"
    Thursday, January 19, 2012 3:53 AM
    Moderator
  • Hi sba,

     

    How about the problem on your side?

     

    Do you still need any assistant about the problem? If you still show any concern on the problem, just feel free to let us know.
     
    Best Regards,


    Daniel van den Berg | Washington, USA | "Anticipate the difficult by managing the easy"
    Tuesday, January 24, 2012 7:01 AM
    Moderator
  • Haven't given the AdvancedSearch approach a shot yet.

    Where do I find the reference documentation for the syntax of the AdvancedSearch method (and more specifically the syntax of the 2nd -- query string -- argument)?

     

    Best regards,

     

    Stéphane.

     

    Tuesday, January 24, 2012 8:25 AM
  • Hi Stéphane,

     

    Below the MSDN article concerning the AdvancedSearch Method:

    http://msdn.microsoft.com/en-us/library/aa220071%28v=office.11%29.aspx

     

    Also check your Help File in regards to specific info.

    If not already done so, you can download the VBA Reference of 2003 in here:

    http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=7832

     

    Hope this helps,

     


    Daniel van den Berg | Washington, USA | "Anticipate the difficult by managing the easy"
    Thursday, January 26, 2012 6:05 AM
    Moderator
  • Thx for the links.

    Where can I find a DASL reference that is compatible with Outlook 2003's implementation (I've only found Sharepoint 2010 or Exchange 2010-related stuff...)

    Thursday, January 26, 2012 8:25 AM
  • Hi Stéphane,

    You can find more info on using the DASL reference with Outlook 2003 in below Blog:

    http://blogs.msdn.com/b/andrewdelin/archive/2005/05/11/416312.aspx

     

    Hope this helps,

     


    Daniel van den Berg | Washington, USA | "Anticipate the difficult by managing the easy"
    Friday, January 27, 2012 6:57 PM
    Moderator