Outlook does not support macros. You can, however, write a little code to
do this. See http://www.outlookcode.com or post to
microsoft.public.program_vba.

Signature
Milly Staples [MVP - Outlook]
Post all replies to the group to keep the discussion intact.
How to ask a question: http://support.microsoft.com/KB/555375
After furious head scratching, UsedToCode asked:
| On a similar note, I would like to create a few macro buttons, where
| each button would assign a specific (pre-programmed) category to a
[quoted text clipped - 14 lines]
|| Thanks for your help.
|| rgds.
UsedToCode - 30 Jul 2008 22:18 GMT
Thanks for your response, but Outlook does make reference to macros. In any
case, I found the following code in another thread that enables me to select
a bunch of emails in my Inbox and move them to the folder called “RcvBkt”,
which is a folder located within my Inbox. I would like to assign a
hard-coded category to a number of selected emails in my inbox. I imagine the
code is very similar, except the move statement in the routine below would
change to something like the statement below. However, the closest thing I’ve
come up with is "objItem.Categories", but it’s not an action like move is so
it doesn’t work. Any suggestions?
objItem.SetCategory “PERSONAL”
Sub MoveIt()
On Error Resume Next
Dim objFolder As Outlook.MAPIFolder, objInbox As Outlook.MAPIFolder
Dim objNS As Outlook.NameSpace, objItem As Outlook.MailItem
Set objNS = Application.GetNamespace("MAPI")
Set objInbox = objNS.GetDefaultFolder(olFolderInbox)
Set objFolder = objInbox.Folders("RcvBkt")
If Application.ActiveExplorer.Selection.Count = 0 Then
'Require that this procedure be called only when a message is selected
Exit Sub
End If
For Each objItem In Application.ActiveExplorer.Selection
If objFolder.DefaultItemType = olMailItem Then
If objItem.Class = olMail Then
objItem.Move objFolder
End If
End If
Next
Set objItem = Nothing
Set objFolder = Nothing
Set objInbox = Nothing
Set objNS = Nothing
End Sub
> Outlook does not support macros. You can, however, write a little code to
> do this. See http://www.outlookcode.com or post to
[quoted text clipped - 18 lines]
> || Thanks for your help.
> || rgds.