Results 1 to 15 of 15
  1. #1
    Silver Lounger
    Join Date
    Jan 2001
    Location
    West Long Branch, New Jersey, USA
    Posts
    1,921
    Thanks
    6
    Thanked 9 Times in 7 Posts

    create category for master list (2003)

    Hi All,

    Yesterday, I tried to play around with the Outlook VBA environment for the first time (being familiar with that in Word, Excel, and Access). I was trying to do 2 things to make my life a little easier. The first thing I saw, unless I missed it, was that one cannot record a macro like you can in other programs.

    What I'd like to do is create a macro that allows me to add a category to the master list by having such a capability on the context menu when I right click on a folder. My problem is that many emails can be filed in numerous folders. In Windows, I'd just store the file in one folder and add a shortcut to the file in other folders. When I looked for the file, I'd find it no matter in which of several folders that made logical sense (to me) I had put the file. Would like the same capability for email so thought categories was the solution. The name of the category would be the folder name or the folder name could be suggested as a default in a small form (since I use comma's in my folder names, which may not be allowed in a category name).

    If there are other solutions to the problem, I'd like to know what others do. I really don't use Outlook very much other than to read email and a little bit of scheduling.

    TIA

    Fred

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: create category for master list (2003)

    Outlook doesn't have a macro recorder.

    The Master List is not exposed in Outlook VBA; you'd have to manipulate the registry (where the master list is stored), but since it's a binary value, that's not easy. See this newsgroup thread.

  3. #3
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Salt Lake City, Utah, USA
    Posts
    9,508
    Thanks
    0
    Thanked 6 Times in 6 Posts

    Re: create category for master list (2003)

    <!post=This post,549,323>This post<!/post> doesn't do exactly what you are asking, but it shows how to pop the categories dialog, and so may be helpful.
    -John ... I float in liquid gardens
    UTC -7ąDS

  4. #4
    Silver Lounger
    Join Date
    Jan 2001
    Location
    West Long Branch, New Jersey, USA
    Posts
    1,921
    Thanks
    6
    Thanked 9 Times in 7 Posts

    Re: create category for master list (2003)

    Thanks Hans.

    Seems like you're everywhere.

    I looked at the newsgroup thread you mentioned. It looks doable but I'm not going to rise to the challenge. There was a time in my life that I would but this is definitely not worth it.

    Fred

  5. #5
    Silver Lounger
    Join Date
    Jan 2001
    Location
    West Long Branch, New Jersey, USA
    Posts
    1,921
    Thanks
    6
    Thanked 9 Times in 7 Posts

    Re: create category for master list (2003)

    Thanks John.

    I don't understand the code since I have no idea what an Inspector is, other than Inspector Clousseau. However, I added it to a module and made it a public sub to be able to add a button to the toolbar. Nothing happened when I clicked the button or clicked on the Run menu while in the VBE with the cursor in the sub.

    Fred

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: create category for master list (2003)

    An Inspector is the window in which you view an item such as an e-mail, an appointment or a task. The code John pointed to will only do something if such a window is open. If only the main Outlook window is open (called an 'Explorer'), the code will do nothing. So open an e-mail and run the code.

  7. #7
    Silver Lounger
    Join Date
    Jan 2001
    Location
    West Long Branch, New Jersey, USA
    Posts
    1,921
    Thanks
    6
    Thanked 9 Times in 7 Posts

    Re: create category for master list (2003)

    Thanks Hans.

    If Explorers had to wait for Inspectors, nothing would get done.

    I opened an email and ran the code. Got the list of categories. I would like to have gotten right into the Master Category List. Sounds like that can't be done, not easily. Even if done thru the registry, I wonder if someone wrote a hack that provides a friendly user interface (type the Category name) and updates the registry. Time to explore.

    Fred

  8. #8
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: create category for master list (2003)

    There's a third-party add-in OLCat - Outlook Categories Management. It's not free, but you can download a fully functional 14-day trial version.

  9. #9
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Salt Lake City, Utah, USA
    Posts
    9,508
    Thanks
    0
    Thanked 6 Times in 6 Posts

    Re: create category for master list (2003)

    When the Categories dialog is poppped by the code, it has a button on the bottom right to open the Master Categories List UI, which is why I thought it might be useful.

    I can write a version that applies to both folder view items and open items and post it later. The Explorers and Inspectors Objects in Outlook are certainly a strange Object model compared to Word, Excel and Access.
    -John ... I float in liquid gardens
    UTC -7ąDS

  10. #10
    Silver Lounger
    Join Date
    Jan 2001
    Location
    West Long Branch, New Jersey, USA
    Posts
    1,921
    Thanks
    6
    Thanked 9 Times in 7 Posts

    Re: create category for master list (2003)

    Hi John,

    Thanks for the info.

    Yes, I knew where the button was for the Master Category List.

    I'm not sure what you're suggesting in terms of what you could write and I wouldn't want you to go thru any trouble for something that might not help. I don't know if you read my original post but let me briefly mention what I was after.

    When I file email, there's a good chance it could go into 1 of 2, maybe even 3, folders. When I want to find it later, I need to recall where I put it. I get around this by checking the categories that the email pertains to and using Advanced Search later based on category. These categories are taken directly from the names of the email folders. So when I create a new email folder, I also want to create a new category. Ideally, if I could right click the new folder and get right to the MCL dialog, I could create the category (even more ideally, the folder creation dialog would allow me to create the category at the same time). So, when creating a folder, I might not have an open email (Explorer or Inspector, forget which that is).

    Anyway, let me know what you come up with.

    Fred

  11. #11
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: create category for master list (2003)

    John, you know *much* more about Outlook and Outlook VBA than I do.

    You are correct that it's not necessary to access the Master Categories List to assign a category. In fact, the category/categories assigned to an item are completely independent of the MCL - you can assign any category to an item, whether it's in the MCL or not.

  12. #12
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Salt Lake City, Utah, USA
    Posts
    9,508
    Thanks
    0
    Thanked 6 Times in 6 Posts

    Re: create category for master list (2003)

    <P ID="edit" class=small>(Edited by JohnBF on 18-Nov-06 14:06. Corrected misstatement about MCL)</P>Fred, some explanation and some throughts. First, Categories are an Item Property, not a Folder Property, so the idea of a Folder level popup to assign a Category won't directly work. However using code to bulk assign a default Category to all existing items in a folder, and using the Item_Add Event to subsequently add a default Category to every item that gets added to that folder is feasible. On the other hand it seems redundant to assign a Category with the same name as the Folder. With enough code work I expect you could add an option to the Folder popup menu to select a default Category to all Items in a Folder, but there would be nowhere for that default Category to be saved at the Folder level, it would be "saved" in the Item_Add event for future additions to the Items in that Folder. Does that now make sense?

    Also, it's possible I'm missing something that Hans knows, but if you want to assign new Categories, which get added to the Categories list but NOT the MCL, you do not need any special direct access to the MCL in the Registry, simply set a Category by assigning it:

    ActiveInspector.CurrentItem.Categories = "Rings of Saturn"

    (Sue Mosher points this out in the last post to the thread Hans mentioned. However she doesn't mention that non-MCL Categories do not relocate to new machines easily.)
    -John ... I float in liquid gardens
    UTC -7ąDS

  13. #13
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Salt Lake City, Utah, USA
    Posts
    9,508
    Thanks
    0
    Thanked 6 Times in 6 Posts

    Re: create category for master list (2003)

    You'll see that I just corrected a misstatement - I had initially stated that a newly created Category gets added to the MCL, and that is not so. So if Fred really wants to add Categories to his MCL, he has to use the API route Ken Slovak explains in the thread you referenced.
    -John ... I float in liquid gardens
    UTC -7ąDS

  14. #14
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: create category for master list (2003)

    That's true - I don't think there's another way to manipulate the MCL. But as you noted, you don't need the MCL to assign a category to an Outlook item.

  15. #15
    Silver Lounger
    Join Date
    Jan 2001
    Location
    West Long Branch, New Jersey, USA
    Posts
    1,921
    Thanks
    6
    Thanked 9 Times in 7 Posts

    Re: create category for master list (2003)

    Hi John,

    I'm not sure if we're in the same folder, ummm...on the same page.

    I understand that a category is not a folder property but rather an item property. Most of my items are "email" msgs, a few calendar items, fewer to-do items, and maybe 1 or 2 contacts at most.

    Our corporate environment allows us to have a limited amount of space on the corporate server, so we create .pst files on our PC's own hard disk. Once email comes into the Inbox on the server, it's best to delete it or move it to the .pst on the hard disk. If you don't, you'll get to a point where you won't be able to send anything out until you get back under the limit. Kind of like hockey or soccer where offensive players have to sometimes get back onside before advancing forward.

    So on my hard disk, I have a folder like "Fred's saved email". Under that I have a bunch of subfolders. Let's call them "Word", "Excel" for now.

    Suppose I want to save email from the lounge. Emails from the Word board go into the Word folder and from the Excel board go into the Excel folder. No problem.

    Now suppose there's an email on the Excel Board that deals with capturing cells and pasting them into Word. Of course, I could put that email in both folders but that's not a great idea with lots of msgs. So, having created categories already corresponding to each folder, I pick whichever makes sense at the moment and mark both categories for this email. Only if I think this email has no chance of being associated with another topic (folder) would I not bother to check any category. Later, when I want to look for things dealing with Excel, I'd look in the Excel folder. If it's not there, I might remember to look in Word. But better, I'd do an Advanced Find on the Excel category so it doesn't really matter where I put it first.

    Now suppose I join a new board, like Outlook, and there's an email on the Word board for doing a mail-merge for Outlook. Of course, I could put this in the Word folder. But I might also want to create a new folder called...Outlook. It's an this point that I want to also create a category called Outlook so I can find this later in case I did stick this email into the Word folder. Again, as long as both categories are checked then it doesn't matter where I put it and I can find it later.

    Now change the scenario to 10's of messages a day, at least 20 subfolders under "Fred's saved email" and new ones being created all the time.

    So the idea of bulk assigning a default category to each item in a folder would not work across folders. It could work to ensure that all items/emails in a folder are assigned the category associated with the folder. BUT, sometimes my folder names have comma's in them and I discovered that you can't use comma's when creating a new category because Outlook thinks you're creating 2 categories. But each folder would have a different "default" category. I think you observed this also.

    You suggested that adding the category associated with the folder does not have much value. I tend to agree. The value comes up when I look at the folder where I think I put the message and it's not there. Rather than checking what could be 2 or 3 other folders, I'd go to Advanced Find and search on Category. It's not as if my emails could be in any of 10 or 15 folders; 2 is the usual case and the max is probably 3 or 4 at most.

    I think that what might be the easiest all around and not require any code or work is just to remember to occassionally go thru the "Edit Categories" dialog and create my categories at that time. Just have to remember what folders have been added recently and create a new category for it. Given that the names of my categories reflect folder names, that won't be too bad.

    Thanks again.

    Fred

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •