#1
|
|||
|
|||
How to create Macro in Outlook 365 to copy to personal folder
I have set up Outlook so that when I click the button that says "archive" it moves the email to a folder called "Read". I wanted to move it to a personal folder but couldn't find a way to do that.
What I now want to do is to create a macro that moves emails from the folder called "read" to a personal folder called "read". I am new to Macros in Outlook so bear with me as I will likely need some detail. Thanks |
#2
|
||||
|
||||
In order to do this it is necessary to understand your folder tree and where in relation to that tree the two 'read' folders in question lie. What are the names of the folder headings in the folder task pane and where does the read folder lie?
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
#3
|
|||
|
|||
Hi,
We have an exchange server. One of my folders on the server is called "Read". This is in the root folder. This is the folder that I use when I click "Archive". I also have personal folders set up which are stored locally. I have one folder here also called "read". This is also in the root folder. Does this help? |
#4
|
||||
|
||||
The following should help you get started.
Code:
Sub MoveToRead() Dim olMsg As MailItem Dim olStore As Store Dim olFolder As Folder On Error Resume Next Set olMsg = ActiveExplorer.Selection.Item(1) For Each olStore In Session.Stores If olStore.DisplayName = "Personal Folders" Then 'the name of the root folder Set olFolder = olStore.GetRootFolder.folders("Read") 'a folder directly off the root olMsg.Move olFolder Exit For End If Next olStore lbl_Exit: Exit Sub End Sub
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
Tags |
macro, outlook 2016, vba |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
create rule to copy sent items to specified folder | shmu | Outlook | 0 | 12-15-2015 04:08 AM |
unable to copy / move file from Outlook preview pane to zip folder | dgiardina | Outlook | 0 | 01-26-2015 06:33 AM |
Need to create a folder in Outlook AND on the Hardrive at the same time. | cyanosaur | Outlook | 0 | 04-25-2012 07:49 PM |
How to create a system folder with VB macro? | Joe Patrick | Word VBA | 4 | 12-17-2011 02:04 PM |
outlook 2003 always not remove temp copy of opened attachments in temporary folder | c.itech | Outlook | 0 | 06-20-2011 10:34 PM |