![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
#11
|
|||
|
|||
![]()
I tested the code and a quickie VBA macro, as well as one of my own addins
that uses VB6, and I cannot reproduce any problem in persisting changes to the categories list. See the post by Michael Bauer and see if what he says applies to your situation. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Professional Programming Outlook 2007. Reminder Manager, Extended Reminders, Attachment Options. http://www.slovaktech.com/products.htm "spottedmahn" wrote in message ... Hi Ken, thanks again for the response. Yes the both branches of that if else are being executed. I put a breakpoint in each of them and stepped thru the code. Here is a screen shot of what is happening: http://spottedmahn.spaces.live.com/b...016B!407.entry |
Ads |
#12
|
|||
|
|||
![]()
I hope I'm not double posting... I clicked post but the dialog never went away.
No, I don't we are using IMAP but how do I verify? If I look at my account settings the type is "Exchange" which suspect means MAPI. I am connecting to an Exchange server. Are you asking if I can update my calendar? If so, then yes I can modify my calendar. Yes, I can add categories using Outlook dialog. To test I added a new category, assigned it to an email, remoted into our terminal server, opened Outlook and the email was there with the new category. Thanks, Mike D. "Michael Bauer [MVP - Outlook]" wrote: Is your default mail account by chance IMAP? That could explain it as IMAP doesn't support categories. Outlook won't try to write the categories to the Master Category List until you close it, and that's when they get lost. Other ideas: you're connected to a mailserver other than Exchange, or you don't have the permission to write to the default calendar of the mailbox. Did you test already whether or not you can add categories to the mailbox by using Outlook's Categorize dialog? -- Best regards Michael Bauer - MVP Outlook : Outlook Categories? Category Manager Is Your Tool : VBOffice Reporter for Data Analysis & Reporting : http://www.vboffice.net/product.html?pub=6&lang=en Am Wed, 24 Jun 2009 10:15:01 -0700 schrieb spottedmahn: Hi Ken, thanks again for the response. Yes the both branches of that if else are being executed. I put a breakpoint in each of them and stepped thru the code. Here is a screen shot of what is happening: http://spottedmahn.spaces.live.com/b...016B!407.entry "Ken Slovak - [MVP - Outlook]" wrote: The line that I see on a brief scan of the code that actually adds a new category to the Categories collection is this: this.olNS.Categories.Add(Cat.Name, Cat.Color, Cat.ShortcutKey); Are you sure this line is actually being executed in your code? Maybe add a Debug.Writeline() call just before that line to verify it is being hit, otherwise whatever you do won't persist. |
#13
|
|||
|
|||
![]()
Hi Ken, thanks for testing the code.
I have read Michael Bauer's post and posted a reply. Mike D. "Ken Slovak - [MVP - Outlook]" wrote: I tested the code and a quickie VBA macro, as well as one of my own addins that uses VB6, and I cannot reproduce any problem in persisting changes to the categories list. See the post by Michael Bauer and see if what he says applies to your situation. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Professional Programming Outlook 2007. Reminder Manager, Extended Reminders, Attachment Options. http://www.slovaktech.com/products.htm "spottedmahn" wrote in message ... Hi Ken, thanks again for the response. Yes the both branches of that if else are being executed. I put a breakpoint in each of them and stepped thru the code. Here is a screen shot of what is happening: http://spottedmahn.spaces.live.com/b...016B!407.entry |
#14
|
|||
|
|||
![]() If you use the Outlook dialog to add a category, see if it still exists in your Master Category List, i.e. the list you see when you click the Categorize button, after re-starting Outlook. -- Best regards Michael Bauer - MVP Outlook : Outlook Categories? Category Manager Is Your Tool : VBOffice Reporter for Data Analysis & Reporting : http://www.vboffice.net/product.html?pub=6&lang=en Am Mon, 29 Jun 2009 09:52:01 -0700 schrieb spottedmahn: I hope I'm not double posting... I clicked post but the dialog never went away. No, I don't we are using IMAP but how do I verify? If I look at my account settings the type is "Exchange" which suspect means MAPI. I am connecting to an Exchange server. Are you asking if I can update my calendar? If so, then yes I can modify my calendar. Yes, I can add categories using Outlook dialog. To test I added a new category, assigned it to an email, remoted into our terminal server, opened Outlook and the email was there with the new category. Thanks, Mike D. "Michael Bauer [MVP - Outlook]" wrote: Is your default mail account by chance IMAP? That could explain it as IMAP doesn't support categories. Outlook won't try to write the categories to the Master Category List until you close it, and that's when they get lost. Other ideas: you're connected to a mailserver other than Exchange, or you don't have the permission to write to the default calendar of the mailbox. Did you test already whether or not you can add categories to the mailbox by using Outlook's Categorize dialog? -- Best regards Michael Bauer - MVP Outlook : Outlook Categories? Category Manager Is Your Tool : VBOffice Reporter for Data Analysis & Reporting : http://www.vboffice.net/product.html?pub=6&lang=en Am Wed, 24 Jun 2009 10:15:01 -0700 schrieb spottedmahn: Hi Ken, thanks again for the response. Yes the both branches of that if else are being executed. I put a breakpoint in each of them and stepped thru the code. Here is a screen shot of what is happening: http://spottedmahn.spaces.live.com/b...016B!407.entry "Ken Slovak - [MVP - Outlook]" wrote: The line that I see on a brief scan of the code that actually adds a new category to the Categories collection is this: this.olNS.Categories.Add(Cat.Name, Cat.Color, Cat.ShortcutKey); Are you sure this line is actually being executed in your code? Maybe add a Debug.Writeline() call just before that line to verify it is being hit, otherwise whatever you do won't persist. |
#15
|
|||
|
|||
![]()
Yes, I have added a new category via the Outlook dialog, close and reopened
Outlook and the category is there. "Michael Bauer [MVP - Outlook]" wrote: If you use the Outlook dialog to add a category, see if it still exists in your Master Category List, i.e. the list you see when you click the Categorize button, after re-starting Outlook. -- Best regards Michael Bauer - MVP Outlook : Outlook Categories? Category Manager Is Your Tool : VBOffice Reporter for Data Analysis & Reporting : http://www.vboffice.net/product.html?pub=6&lang=en Am Mon, 29 Jun 2009 09:52:01 -0700 schrieb spottedmahn: I hope I'm not double posting... I clicked post but the dialog never went away. No, I don't we are using IMAP but how do I verify? If I look at my account settings the type is "Exchange" which suspect means MAPI. I am connecting to an Exchange server. Are you asking if I can update my calendar? If so, then yes I can modify my calendar. Yes, I can add categories using Outlook dialog. To test I added a new category, assigned it to an email, remoted into our terminal server, opened Outlook and the email was there with the new category. Thanks, Mike D. "Michael Bauer [MVP - Outlook]" wrote: Is your default mail account by chance IMAP? That could explain it as IMAP doesn't support categories. Outlook won't try to write the categories to the Master Category List until you close it, and that's when they get lost. Other ideas: you're connected to a mailserver other than Exchange, or you don't have the permission to write to the default calendar of the mailbox. Did you test already whether or not you can add categories to the mailbox by using Outlook's Categorize dialog? -- Best regards Michael Bauer - MVP Outlook : Outlook Categories? Category Manager Is Your Tool : VBOffice Reporter for Data Analysis & Reporting : http://www.vboffice.net/product.html?pub=6&lang=en Am Wed, 24 Jun 2009 10:15:01 -0700 schrieb spottedmahn: Hi Ken, thanks again for the response. Yes the both branches of that if else are being executed. I put a breakpoint in each of them and stepped thru the code. Here is a screen shot of what is happening: http://spottedmahn.spaces.live.com/b...016B!407.entry "Ken Slovak - [MVP - Outlook]" wrote: The line that I see on a brief scan of the code that actually adds a new category to the Categories collection is this: this.olNS.Categories.Add(Cat.Name, Cat.Color, Cat.ShortcutKey); Are you sure this line is actually being executed in your code? Maybe add a Debug.Writeline() call just before that line to verify it is being hit, otherwise whatever you do won't persist. |
#16
|
|||
|
|||
![]()
Hello Ken,
here is my sample code for deleting existing categories: Option Explicit Dim oOutlook : Set oOutlook = CreateObject("Outlook.Application") Dim oNameSpace : Set oNameSpace = oOutlook.GetNameSpace("MAPI") Dim theCategories Dim theCategory Dim i Set theCategories = oNameSpace.Categories For Each theCategory in theCategories WScript.StdOut.Writeline theCategory.Name & theCategory.CategoryID Next For i = 1 to theCategories.Count theCategories.Remove 1 Next I have tested this code once again on a machine with office 2007 sp1 and the categories were deleted correctly. After installation of sp2 it seems, that the changes (deleting) of categories are not saved to the exchange store. The code is running and the categories seem to be deleted, but after closing and starting outlook, all my categories are back again. Any idea or solution? Manfred "Ken Slovak - [MVP - Outlook]" wrote: As I said to the other poster, I can't repro this problem here on a couple of Outlook 2007 SP2 systems. I plan to test the poster's code when I get a chance to see what's going on. All I can say is that I have my own addin code that completely changes the categories list and it continues to work on SP2. If I do turn up a but created by SP2 I'll report it to MS, but that won't help until or if MS fixes the problem. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Professional Programming Outlook 2007. Reminder Manager, Extended Reminders, Attachment Options. http://www.slovaktech.com/products.htm "Manfred" wrote in message ... Hi all, we have a similar problem. We are using two vb-scripts, the first one to delete all existing categories and a second one to "install" our predefined categories. The two scripts were working since Jan/Feb 2009 with Outlook 2007 SP1. It seems that the scripts for the categories are not working anymore since installing Office 2007 SP2. We have the same symptoms: - Outlook 2007 running - Run one of our vb-script (delete categories or install categories) - I see all categories deleted and then all our custom predefined categories - Close Outlook - Reopen Outlook - All changes in categories are gone. Any idea or solution? Manfred |
#17
|
|||
|
|||
![]()
It's obviously related to your other problem, but I can't repro it here on
any of my Outlook 2007 SP2 systems. So it's specific to your computer. A word of advice, when deleting items from a collection use a count down For loop, not a count up loop. Otherwise the loop usually ends up deleting or moving only 1/2 of the items in each pass. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Professional Programming Outlook 2007. Reminder Manager, Extended Reminders, Attachment Options. http://www.slovaktech.com/products.htm "Manfred" wrote in message ... Hello Ken, here is my sample code for deleting existing categories: Option Explicit Dim oOutlook : Set oOutlook = CreateObject("Outlook.Application") Dim oNameSpace : Set oNameSpace = oOutlook.GetNameSpace("MAPI") Dim theCategories Dim theCategory Dim i Set theCategories = oNameSpace.Categories For Each theCategory in theCategories WScript.StdOut.Writeline theCategory.Name & theCategory.CategoryID Next For i = 1 to theCategories.Count theCategories.Remove 1 Next I have tested this code once again on a machine with office 2007 sp1 and the categories were deleted correctly. After installation of sp2 it seems, that the changes (deleting) of categories are not saved to the exchange store. The code is running and the categories seem to be deleted, but after closing and starting outlook, all my categories are back again. Any idea or solution? Manfred |
#18
|
|||
|
|||
![]()
Hi Ken,
no, this is not a problem with one computer, we have this problem on all computers. And it is definitivly reproducable working with SP1 and NOT working with SP2. The loop was working correctly all the time from Jan 2009 to Jun 2009 (installing SP2), so this is not the problem. In my opinion this is a problem with saving the changes back to the exchange mailbox store. Manfred "Ken Slovak - [MVP - Outlook]" wrote: It's obviously related to your other problem, but I can't repro it here on any of my Outlook 2007 SP2 systems. So it's specific to your computer. A word of advice, when deleting items from a collection use a count down For loop, not a count up loop. Otherwise the loop usually ends up deleting or moving only 1/2 of the items in each pass. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Professional Programming Outlook 2007. Reminder Manager, Extended Reminders, Attachment Options. http://www.slovaktech.com/products.htm "Manfred" wrote in message ... Hello Ken, here is my sample code for deleting existing categories: Option Explicit Dim oOutlook : Set oOutlook = CreateObject("Outlook.Application") Dim oNameSpace : Set oNameSpace = oOutlook.GetNameSpace("MAPI") Dim theCategories Dim theCategory Dim i Set theCategories = oNameSpace.Categories For Each theCategory in theCategories WScript.StdOut.Writeline theCategory.Name & theCategory.CategoryID Next For i = 1 to theCategories.Count theCategories.Remove 1 Next I have tested this code once again on a machine with office 2007 sp1 and the categories were deleted correctly. After installation of sp2 it seems, that the changes (deleting) of categories are not saved to the exchange store. The code is running and the categories seem to be deleted, but after closing and starting outlook, all my categories are back again. Any idea or solution? Manfred |
#19
|
|||
|
|||
![]()
It's obviously not a universal problem since I can't repro it here.
All I can suggest is to open a support case with MS and see what they say. If it's their bug they will refund or waive the charges for the support case, if it's not a bug then you pay for the case. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Professional Programming Outlook 2007. Reminder Manager, Extended Reminders, Attachment Options. http://www.slovaktech.com/products.htm "Manfred" wrote in message ... Hi Ken, no, this is not a problem with one computer, we have this problem on all computers. And it is definitivly reproducable working with SP1 and NOT working with SP2. The loop was working correctly all the time from Jan 2009 to Jun 2009 (installing SP2), so this is not the problem. In my opinion this is a problem with saving the changes back to the exchange mailbox store. Manfred |
#20
|
|||
|
|||
![]()
Thanks for all of your input Ken.
I'll open a case with MSFT and post the results. Regards, Mike D. "Ken Slovak - [MVP - Outlook]" wrote: It's obviously not a universal problem since I can't repro it here. All I can suggest is to open a support case with MS and see what they say. If it's their bug they will refund or waive the charges for the support case, if it's not a bug then you pay for the case. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Professional Programming Outlook 2007. Reminder Manager, Extended Reminders, Attachment Options. http://www.slovaktech.com/products.htm "Manfred" wrote in message ... Hi Ken, no, this is not a problem with one computer, we have this problem on all computers. And it is definitivly reproducable working with SP1 and NOT working with SP2. The loop was working correctly all the time from Jan 2009 to Jun 2009 (installing SP2), so this is not the problem. In my opinion this is a problem with saving the changes back to the exchange mailbox store. Manfred |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Programming custom Categories into Master Categories List | John E. | Outlook - Using Forms | 3 | March 30th 09 11:06 AM |
Public folder calender categories vs user calander categories | Help me | Outlook - Calandaring | 5 | November 2nd 07 07:44 AM |
Categories not saved for sent/replied/forwarded messages (O2K7) | Lillo Ramos, Alex | Outlook - General Queries | 3 | June 29th 07 08:53 AM |
Outlook 2007 Categories are a combo of Categories & Labels in 2003 | Scott Sherman | Outlook - Calandaring | 0 | February 13th 07 04:23 AM |
Tasks categories. Unable to modify another user's categories. | Tommy | Outlook - Installation | 0 | August 9th 06 04:43 PM |