Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 09-05-2016, 01:25 AM
gmayor's Avatar
gmayor gmayor is offline How to create Macro in Outlook 365 to copy to personal folder Windows 10 How to create Macro in Outlook 365 to copy to personal folder Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,144
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default


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
Reply With Quote
Reply

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

Other Forums: Access Forums

All times are GMT -7. The time now is 09:00 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft