Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 08-26-2011, 06:16 AM
ker09 ker09 is offline Rule on Category Change Windows 7 32bit Rule on Category Change Office 2010 32bit
Novice
Rule on Category Change
 
Join Date: Aug 2011
Posts: 2
ker09 is on a distinguished road
Default Rule on Category Change

I would like to have a rule run when a category on an existing in-box message is changed (e.g., category is changed to "done", automatically move it to the Done folder).

Thank you.
Reply With Quote
  #2  
Old 08-29-2011, 06:15 AM
ker09 ker09 is offline Rule on Category Change Windows 7 32bit Rule on Category Change Office 2010 32bit
Novice
Rule on Category Change
 
Join Date: Aug 2011
Posts: 2
ker09 is on a distinguished road
Default

Anybody got any VBA or other ideas? I'm familiar with VBA in Excel, but not with Outlook terminology.

I've got this code, but it breaks on the line indicated. i don't know how to name the folders

Sub MoveItems()
Dim myOlApp As New Outlook.Application
Dim myNameSpace As Outlook.NameSpace
Dim myBox As Outlook.MAPIFolder
Dim myDestFolder As Outlook.MAPIFolder
Dim myItems As Outlook.Items
Dim myItem As Object
Set myNameSpace = myOlApp.GetNamespace("MAPI")
Set myBox = myBox.Folders("!PS-In-Florida")
'was: myNameSpace.GetDefaultFolder (olFolderInbox)

Set myItems = myInbox.Items
Set myDestFolder = myInbox.Folders("PS-Completed Items")
Set myItem = myItems.Find("[Category] Like '*Done*'")
While TypeName(myItem) <> "Nothing"
myItem.Move myDestFolder
Set myItem = myItems.FindNext
Wend
End Sub

Last edited by ker09; 08-29-2011 at 10:11 AM.
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
MS Office colour category chaos action 49 Office 0 02-08-2011 12:05 AM
Archive according to category? Outlook 2007 EllieW Outlook 0 01-10-2011 11:45 AM
Lost Category Associations for All Contacts nitsuj Outlook 0 12-30-2010 10:21 AM
Rule on Category Change What is the difference between the category and the distribution list? Jamal NUMAN Outlook 1 11-21-2010 09:31 PM
Archive rule based on Category jerelp Outlook 0 02-18-2010 08:04 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:22 AM.


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