+ Reply to Thread
Results 1 to 27 of 27

button to copy and move emails

  1. #1
    Forum Contributor
    Join Date
    06-23-2007
    Posts
    690

    button to copy and move emails

    hi guys
    i get over 200 emails a day at work and i need to sort them as fast as i can which at the minute takes ages
    i would like a button or maybe even a right click option where i can select copy to or move to
    then type in the folder it needs to go to.
    i have over 6000 fodlers that it could go in so i need to make this as simple as possible
    regards

  2. #2
    Forum Contributor
    Join Date
    06-23-2007
    Posts
    690
    ideally a button would provide a pop up asking me where email should go
    i can then type in the folders name
    ie J5800 and off it goes
    i do also have some for suppliers and staff names
    lots of the emails i get dont have references in so that i can set up the other way so if i could do this it would be great

  3. #3
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531
    Steve, to be honest I'm not quite sure how this would work.... as I see you essentially have 1 of 2 approaches available to you

    1 - enter the name in a dialog box
    -- this would then require the VBA iterate your mailbox whilst trying to find the chosen folder in which to move the selected items into (presumably you would want to move 1+ at a time ?)

    2 - pick the folder itself using some sort of "select folder" dialog
    -- but this would merely mimic what you would do were you doing it manually... my guess is it takes you too long to "find" the folder, correct ?

    Given the volume of folders you're talking about option 1 "may" be slow to run

    (I'm not an Outlook wiz so someone who is may have other ideas)

    Is there any logic to determine folder selection based on mail subject, content etc... ?
    (ie can you not use standard Rules for some of the items to be moved on delivery thereby limiting the amount you must move by *other* (ie VBA) means)

  4. #4
    Forum Contributor
    Join Date
    06-23-2007
    Posts
    690
    hi donkeyote
    im just after a faster more effective way of copying/moving to the requested folder.
    Im not sure how i can go about it either but at the moment i have to right click select move and then select the folder which is very time consuming.

  5. #5
    Forum Contributor
    Join Date
    06-23-2007
    Posts
    690
    of your options im guessing option 1 is the right choice for me

  6. #6
    Forum Expert
    Join Date
    01-03-2006
    Location
    Waikato, New Zealand
    MS-Off Ver
    2010 @ work & 2007 @ home
    Posts
    2,243
    hi Steve,
    I'm not an Outlook wizz either but you should be able to order your Inbox by using an identifying field (eg From or Subject etc), select all the relevant emails, then "drag & drop" them into the relevant folder (set your screen up to show the Folders in a tree structure on the left of your screen).

    If you have some solid logic for the sorting process you can set up Outlook rules which automatically file the emails based on criteria under Outlook - Tools - Rules & Alerts... . I think there are some limitation to the number of rules but that can be checked by a quick Google.
    edit: Ooopps! I didn't see that Donkeyote had already mentioned the std Rules approach.


    hth
    Rob
    Last edited by broro183; 12-29-2008 at 07:31 AM.
    Rob Brockett
    Kiwi in the UK
    Always learning & the best way to learn is to experience...

  7. #7
    Forum Contributor
    Join Date
    06-23-2007
    Posts
    690
    hi broro
    thanks for the reply
    i already use rules where possible but most of my emails that come in cannot be used in that particualr way

  8. #8
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531
    Hi Steve, I agree with Rob who reiterates my point re: rules... ie you've not specified if there is any underlying logic to the movement of the mail items themselves in whole or part.

  9. #9
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531
    EDIT: simultaneous posts' :-) ...

    Steve, I will post something up VBA wise -- doing a few other bits and pieces presently

  10. #10
    Forum Contributor
    Join Date
    06-23-2007
    Posts
    690
    thanks donkeyote
    dont go out of your way for me though im more than happy to wait
    regards

  11. #11
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531
    Steve, I've cobbled something together here... this should all reside in a stand alone module (Insert - Module)

    My code:

    Please Login or Register  to view this content.
    The above utilises the below function which I picked up online -- this can be placed either in the same module as the above or in a separate module, whichever you prefer... this function does the hard work (which I was wasting time replicating) namely locating the folder based on just it's short hand name (given it could reside anywhere in the mailbox at any level in the hierarchy) -- so credit where credit to Jeff Rockow.

    Please Login or Register  to view this content.
    If you wish to run the MOVE_MAIL routine from a button directly on your toolbar then do the following:

    Please Login or Register  to view this content.
    Last edited by DonkeyOte; 12-29-2008 at 09:45 AM.

  12. #12
    Forum Contributor
    Join Date
    06-23-2007
    Posts
    690
    hi donkey
    thanks for your efforts
    even though i have changed nothing
    im trying the top one
    im getting a message
    the macros in this project are disabled
    and i havent done anything to it~???

  13. #13
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531
    OK just to clarify you need both pieces of code for this to work-- mine uses the 2nd piece in the following line:

    Please Login or Register  to view this content.
    The bit in red utilises the 2nd bit of code.

    Re: Macros disabled warning... ensure you have both bits of code stored then save the VBA project in the VB Editor (where the code is) using the Save Icon at the top ... then Quit Outlook -- re-open ... if prompted opt to Enable Macros.

    Check to see if it works.

    (Given your other posts in this forum I'm assuming that you can't have High security in place as you have successfully implemented other solutions)

  14. #14
    Forum Contributor
    Join Date
    06-23-2007
    Posts
    690
    how do i enable them donkey i cant seem to

  15. #15
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531
    When you re-opened OL were the Macros disabled ?

    If so go to Tools -> Macro -> Security

    I would select Medium for pre 2007 versions or for 2007 select "Warnings for All Macros".

    Close OL -- reopen -- hit ALT + F11 -- when prompted choose Enable.

  16. #16
    Forum Contributor
    Join Date
    06-23-2007
    Posts
    690
    OH MY GOD
    donkeyote that is absolutely amazing
    thats going to save so much time its unreal
    is there anyway i can have a copy button to as i sometimes have to copy emails to several folders
    thanks so much

  17. #17
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531
    I've tweaked my code to below:

    Please Login or Register  to view this content.
    This is not thoroughly tested but in essence you will now get 2 prompts...

    Prompt 1 -- as before -- enter Folder Name
    Prompt 2 -- new -- action -- Move (enter M) or Copy (enter C)

    The code should do the rest based on the results of those prompts.

    Note: the other code (the function I gleaned from the internet) remains unaltered.

  18. #18
    Forum Contributor
    Join Date
    06-23-2007
    Posts
    690
    absolutely amazing

    the only thing i dont like personally is the fact that if you make a mistake of any kind you cant get out of it until you click no retry

    did you get my pm?

  19. #19
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531
    Not sure I follow -- what do you mean by making a mistake and not being able to exit ?

    As I see it you can only make a mistake one of two ways:

    1 -- enter an incorrect action (ie failing to enter M or C in 2nd Input Box)
    2 -- enter an invalid folder name

    The former error loops you back to re-enter the action whereas the latter asks if you wish to terminate altogether via No response to Re-Try prompt.

    Do you mean you would like an exit point prior to the routine commencing -- ie click button -- "Are you sure you want to do this...?"

    As for the PM -- yes received... not had time to respond as yet but no recompense necessary... I'm a layabout presently with lots of time to kill... :-)

  20. #20
    Forum Contributor
    Join Date
    06-23-2007
    Posts
    690
    Donkey
    its ok dont worry im being far too picky
    thank you so so much
    i can live with the outcome

    very many king regards

  21. #21
    Forum Contributor
    Join Date
    06-23-2007
    Posts
    690
    i have just noticed a little flaw that is a tad annoying
    its case sensitive
    surely thats easy to change?

  22. #22
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531
    you will need to adjust the 2nd bit of code (ie the Function I collected from the internet), change the following line:

    Please Login or Register  to view this content.
    to

    Please Login or Register  to view this content.
    by coercing both to UCASE the test becomes case insensitive... though obviously in doing so you lose the ability to differentiate between Folder x and Folder X and other variations... if you want to toggle case sensitivity you could do, let me know and I will post back later.

  23. #23
    Forum Contributor
    Join Date
    06-23-2007
    Posts
    690
    im not entirely sure what you mean by toggle
    i will give it a go
    right now
    thanks

    just tried it and thats perfect

    youre a star
    Last edited by stevesunfold; 12-29-2008 at 12:46 PM.

  24. #24
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531
    by toggle I meant that you could in theory pass a further optional argument to the Function that dictated as to whether or not the search should be case sensitive or not... would require a little tweak to both my code and the existing Function.

  25. #25
    Forum Contributor
    Join Date
    06-23-2007
    Posts
    690
    more than happy
    this will save me no end of time
    so many thanks to you for all your effort
    kind regards
    steve

  26. #26
    Registered User
    Join Date
    06-11-2008
    Location
    Hyderabad
    Posts
    54

    Thumbs up Re: button to copy and move emails

    Steve,

    I think all these codes are time consuming ---

    here is an idea for you think smart to do this---

    After receving all the mails in you Inbox you can have a standered wording either in subject or the body line.Then you need to go to right end corner where you can see a button as Options then click on it then go to advanced find and then go to 2nd Option - Subject field and message body where you type the standered word and date you have sent to them then it will collect all the mails with the word and date which you sent to them then after receving all the emails then you right click and then to the folder you want it ....> hope this helps you very fast instead of doing all these steady work
    Thank you,

    Surya

  27. #27
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: button to copy and move emails

    Surya,

    2 questions

    1) have you actually read the post in full

    2) have you actually tested the code ?

    I suspect the answer is no on both counts.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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