A week or so ago, I had asked a question on how to assign
categories to emails and I got a great answer based on what
I had asked. Since that time, I have found that I missed a
necessary requirment the appointment items I get that I
also need to categorize.
So to recap, I am looking for a way to assign categories to
emails (and appointment items) through a macro. I can
currently select several emails (and appointment items) in
my inbox, then right click and select categories, then
select the category I want, but what I would like to do is
create a macro which I can place in a toolbar. When I
select items in my inbox, I would then go to the toolbar,
and select the correct button to assign them to the
appropriate category.
What I got back then and am currently using is as follows:
Sub AssignDepartment()
'Assigns the selected email items to the DepartmentCategory
Dim oSel As Outlook.Selection
Dim oMail As Outlook.MailItem
Set oSel = Application.ActiveExplorer.Selection
For Each oMail In oSel
oMail.Categories = "Department"
oMail.Save
Next
End Sub
Is there a way to modify this to include Outlook.MailItem
as well as Outlook.AppointmentItem?
Thanks
KdBrown
Sue Mosher [MVP-Outlook] - 27 Feb 2004 14:22 GMT
Dim oMail as Object not Outlook.MailItem

Signature
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx
> A week or so ago, I had asked a question on how to assign
> categories to emails and I got a great answer based on what
[quoted text clipped - 32 lines]
> Thanks
> KdBrown
Thanks, now I just have to modify all my macros!
KdBrown
>-----Original Message-----
>Dim oMail as Object not Outlook.MailItem
[quoted text clipped - 36 lines]
>
>.