![]() |
|
|
|
#1
|
||||
|
||||
|
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 |