![]() |
|
|
Thread Tools | Display Modes |
#2
|
||||
|
||||
![]()
Assuming the account name is Office then
Code:
Sub MoveSelectedMsg() Dim olStore As Store Dim olFolder As Folder Dim olItem As MailItem On Error Resume Next Select Case Outlook.Application.ActiveWindow.Class Case olInspector Set olItem = ActiveInspector.currentItem Case olExplorer Set olItem = Application.ActiveExplorer.Selection.Item(1) End Select For Each olStore In Session.Stores If olStore = "Office" Then Set olFolder = olStore.GetDefaultFolder(olFolderInbox).folders("Suppliers") olItem.Move olFolder Exit For End If Next olStore Set olStore = Nothing Set olFolder = Nothing Set olItem = Nothing End Sub
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Acces a subfolder as main folder over imap in outlook 2010 | Bandit | Outlook | 0 | 10-05-2013 06:23 AM |
Add folder and subfolder to Favorite | ying06 | Outlook | 0 | 03-30-2012 10:41 AM |
Setting a default folder for items to be linked | Thrilling | Outlook | 1 | 03-12-2012 12:09 PM |
How does Outlook decide which Sent Items folder? | rowan.bradley | Outlook | 1 | 02-12-2011 01:43 PM |
Export Subfolder ~ Now ENTIRE Archive Folder is missing? HELP! | TwinCams | Outlook | 0 | 01-31-2011 11:24 AM |