![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
Hi,
I need a bit of help please. I am looking for a macro that allows me to move emails from a specific folder (under a Microsoft exchange inbox) to a specific folder (on a pst file). The macro has to be easy to be modified as my needs change on a monthly bases. The reason of my request is that the company i work for gave me a blackberry linked to my work exchange account. Presently, i have to pass 2 times through my emails (once when I receive them on my BB, second time, on my PC to file them). I replicated the PST entire folder structure in my inbox to be able to file the emails from my BB once they are read. The problem I am facing is that I have to do about 20 to 25 copy pastes per each 2-3 days in order to keep my exchange mailbox under the storage limit. IIf anybody could give me a hand to automatize this time wasting situation, I would much appreciate it. Regards, Emil |
Ads |
#2
|
|||
|
|||
![]()
Why not use the AutoArchive feature and have Outlook create a PST file
on your local drive? Or ask IT to increase your limit? If you want a VBA solution, you need to set an object reference to the message you want to move, and the folder you want to move it to. For example, this code will move a selected or open mail item to a folder called "Archive", one level below the Inbox (if you don't have that folder, you would need to create it). Adjust reference as necessary. Sub MoveEmail() Dim myItem As Outlook.MailItem Dim MyFolder As Outlook.MAPIFolder Dim olNS as Namespace ' get valid ref to current item On Error Resume Next Select Case TypeName(Application.ActiveWindow) Case "Explorer" Set myItem = ActiveExplorer.Selection.Item(1) Case "Inspector" Set myItem = ActiveInspector.CurrentItem Case Else End Select On Error GoTo 0 If myItem Is Nothing Then MsgBox "Could not use current item. Please select or open a single email.", vbInformation Exit Sub End If Set olNS = Application.GetNamespace("MAPI") Set MyFolder = olNS.GetDefaultFolder(olFolderInbox).Folders("Arch ive") myitem.Move MyFolder End Sub You will have to point MyFolder to the correct folder. See http://www.codeforexcelandoutlook.com/ResendMsg.html if you want to assign this code to a toolbar button for easy access. HTH, JP On May 10, 2:09 am, Emil wrote: Hi, I need a bit of help please. I am looking for a macro that allows me to move emails from a specific folder (under a Microsoft exchange inbox) to a specific folder (on a pst file). The macro has to be easy to be modified as my needs change on a monthly bases. The reason of my request is that the company i work for gave me a blackberry linked to my work exchange account. Presently, i have to pass 2 times through my emails (once when I receive them on my BB, second time, on my PC to file them). I replicated the PST entire folder structure in my inbox to be able to file the emails from my BB once they are read. The problem I am facing is that I have to do about 20 to 25 copy pastes per each 2-3 days in order to keep my exchange mailbox under the storage limit. IIf anybody could give me a hand to automatize this time wasting situation, I would much appreciate it. Regards, Emil |
#3
|
|||
|
|||
![]()
Hi JO,
Thanks for your quick answer. The Auto-Archive function is good, but it does not entirely answer my need (it only lets me choose the PST file for the auto archive and it will replicate the inbox folder tree). I need to be able to choose the source folder (from the inbox) and the destination folder (which usualy is an already created folder with a totally different name and path in my PST) Thanks for the macro. It is good, all tough I will need a slight change in it. I do not need to move items that I select from INBOX. I need to move the contents of each one of my 20 folders from under my INBOX to some specific paths in my PST (ex: The contents of the folder MAILBOX/INBOX/Email concerning John will go in PST PersonalFolders/Employees/John Malcom/Emails concerning John) I need it in this way as I file my emails (in my Inbox Folders)when I receive them in on my BlackBerry (which can only access the Exchange Server) and I want to avoid 20 copy/pastes from the inbox folders to their corespondents in my PST. Also, as I work in a customer service enviroment and I change employees often, I would need to be able to change the source and the target folders easily in the macro (I am all new to this type of usage). I would prefer a simple macro (that does only this funtion for one email transfer) and I will multiply it myself for the number of the folders I need. I can more easily work with it as when an employees leaves I only have to remove his specific macro without touching to the others. I really appreciate your help. I hope that what I need is not too complicated to program ![]() Thanks in advance |
#4
|
|||
|
|||
![]()
A more specific question is how to I move ALL emails from the INBOX to
another folder or PST? I set up a rule, the move all emails addressed to me, to antoehr pst. That sounds correct, expect when implemented, it will not move emails sent to me if I'm part of a group. this is goofy. Where is the move *.* commmand? rcd "Emil" wrote: Hi JO, Thanks for your quick answer. The Auto-Archive function is good, but it does not entirely answer my need (it only lets me choose the PST file for the auto archive and it will replicate the inbox folder tree). I need to be able to choose the source folder (from the inbox) and the destination folder (which usualy is an already created folder with a totally different name and path in my PST) Thanks for the macro. It is good, all tough I will need a slight change in it. I do not need to move items that I select from INBOX. I need to move the contents of each one of my 20 folders from under my INBOX to some specific paths in my PST (ex: The contents of the folder MAILBOX/INBOX/Email concerning John will go in PST PersonalFolders/Employees/John Malcom/Emails concerning John) I need it in this way as I file my emails (in my Inbox Folders)when I receive them in on my BlackBerry (which can only access the Exchange Server) and I want to avoid 20 copy/pastes from the inbox folders to their corespondents in my PST. Also, as I work in a customer service enviroment and I change employees often, I would need to be able to change the source and the target folders easily in the macro (I am all new to this type of usage). I would prefer a simple macro (that does only this funtion for one email transfer) and I will multiply it myself for the number of the folders I need. I can more easily work with it as when an employees leaves I only have to remove his specific macro without touching to the others. I really appreciate your help. I hope that what I need is not too complicated to program ![]() Thanks in advance |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
I want birthdays from a specific group to go to a specific calend. | Rachelle | Outlook - Using Contacts | 1 | March 14th 08 04:26 PM |
Send alternate email messages to a specific folder | ufcadmin | Outlook - Installation | 7 | September 10th 07 03:55 PM |
How ...When i move a message to a specific map... | Ikku de Dikku | Outlook - General Queries | 3 | September 21st 06 01:26 PM |
Enforce Specific Encoding To Messages Arrived From Specific Addres | Gil | Outlook and VBA | 3 | April 26th 06 03:00 PM |
Moving Specific Inbox Items to a Specific Subfolder (VBA) | DevDaniel | Outlook and VBA | 1 | April 11th 06 05:46 AM |