Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Outlook / New Users / July 2008

Tip: Looking for answers? Try searching our database.

macro to assign category to new email

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
tempora123@gmail.com - 21 May 2008 10:09 GMT
Hello,

I would like to create a macro, which assigns a specified category to
a new email being composed. To be more specific, on executing this
macro while editing new email, a 'Categories' window would pop up
(which is also selected from 'Options -> Categories') where it is
possible to select a category for the new email.

Thanks for your help.
rgds.
Roady [MVP] - 21 May 2008 12:43 GMT
So how would executing that macro be different from pressing the Categories
button?
If you want to automate assigning categories to outgoing emails, you can
also create a message rule.

Alternatively, this addin might be interesting to you;
http://addins.howto-outlook.com/vboffice_categorymanager

Signature

Robert Sparnaaij [MVP-Outlook]
Coauthor, Configuring Microsoft Outlook 2003
http://www.howto-outlook.com/
Outlook FAQ, HowTo, Downloads, Add-Ins and more

http://www.msoutlook.info/
Real World Questions, Real World Answers

-----

> Hello,
>
[quoted text clipped - 6 lines]
> Thanks for your help.
> rgds.
tempora123@gmail.com - 21 May 2008 18:59 GMT
I need some quick way to assign category to a new email. What would be
the macro to bring up the categories window?
Roady [MVP] - 22 May 2008 10:34 GMT
Why does this have to be a macro?
Press the Categorize button or use the keyboard shortcut for your localized
version of Outlook.

Signature

Robert Sparnaaij [MVP-Outlook]
Coauthor, Configuring Microsoft Outlook 2003
http://www.howto-outlook.com/
Outlook FAQ, HowTo, Downloads, Add-Ins and more

http://www.msoutlook.info/
Real World Questions, Real World Answers

-----

> I need some quick way to assign category to a new email. What would be
> the macro to bring up the categories window?
N.A. - 22 May 2008 22:07 GMT
What do you mean by press the Categorize button?  I don't see a catorgorize
button on the outgoing message form.  I can put the OPtions button on the
toolbar, but it takes too many mouse clicks to finally get the category
assigned.  A macro would be nice because it would be a reminder everytime a
message is sent to assign it to a cateory.

> Why does this have to be a macro?
> Press the Categorize button or use the keyboard shortcut for your localized
> version of Outlook.
>
> > I need some quick way to assign category to a new email. What would be
> > the macro to bring up the categories window?
UsedToCode - 28 Jul 2008 15:44 GMT
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 number of
selected emails in my inbox. I could then set up rules to move categorized
email into appropriate folders. Alternatively, a macro button could just move
the selected emails into a specific (pre-programmed) folder without assigning
a category. Can anyone help with such a macro?

> Hello,
>
[quoted text clipped - 6 lines]
> Thanks for your help.
> rgds.
Milly Staples [MVP - Outlook] - 29 Jul 2008 14:28 GMT
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.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.