View Single Post
  #4  
Old October 10th 07, 05:20 PM posted to microsoft.public.outlook.program_addins
[email protected][_2_]
external usenet poster
 
Posts: 6
Default Rename IMAP folder and Custom View Group by

Thanks for your attention Ken.

Right now I can't seem to reproduce the problem with the folders.. It
was consistent earlier today. So let's forget about that issue for
now.

About my custom view:
I install it the first time the user starts Outlook with the add-in,
on all the folders.
Outlook.View MyView = inbox.Views.Add("My custom view",
Outlook.OlViewType.olTableView,
Outlook.OlViewSaveOption.olViewSaveOptionalAllFold ersOfType);
System.IO.TextReader ViewFile = File.OpenText(sViewFile);
string sXMLText = ViewFile.ReadToEnd();
Translate the string to appropriate language....
MyView.XML = sXMLText;
MyView.Save();
MyView.Apply();

Every time a folder is selected, I force on the view, because I have
experienced that the view sometimes dissapears.
Outlook.View MyView = selectedFolder.Views["My custom view"];
MyView.Apply();

I have also experienced that the view get destroyed. It says the
current view is "My custom view", but the columns indicate that it is
the standard Message IMAP view. To fix it I have to remove the view
and install it all over. To do that I have made an option pane with a
button that says Reset View, which installs the view on the selected
folder. After installing it on the separate folder it seems to stay as
it should forever.

Now.. as you have noticed, the view is defined in a xml file.
I do not have the received date defined as a column, and i suspect
that have something to do with the odd behaviour of the group by
funtionalitity.
However, I have defined in the file that the view shall be ordered by
the datereceived property.
groupbydefault-tag says 2, but I really dont know what that means.
Have tried to set it to 1 and 0, but it didn't seem to matter.

I find it strange that the sorting is functioning as it should when I
manually set it to sort on date, and that it just says Date: None when
I switch back to the folder.


While we're at it.. another issue just appeared.
I got this button on my message form, which is located next to Send
and Print.. in the command button row.. which I call Accept.
Now, if I open one message and press the Accept-button, the message is
accepted on the server (using a separate connection, not IMAP).
But when I open two messages simultaniously, both messages get
accepted when I press the button on one of them.
I've got a mailitem wrapper which initiate an event when we open a
mailitem. What I don't understand is why this event get fired on both
the mailitems. They both have accept-buttons, they both have event to
handle these buttons, but they got separate wrappers which initiates
these. Seems like the event I add on a button gets confused.. as if it
is connected to the name of the button, and not the button itself.
The mailitem wrapper is created in the OnNewInspector handler.

Any suggestions on what to look for would be appreciated.


On 10 Okt, 15:43, "Ken Slovak - [MVP - Outlook]"
wrote:
Does the problem with IMAP happen if your addin isn't installed or running?
If not what is your code doing, are any exceptions being fired from your
code?

For the view, how are you creating it and how are you setting it in the
folder?

--
Ken Slovak
[MVP - Outlook]http://www.slovaktech.com
Author: Professional Programming Outlook 2007
Reminder Manager, Extended Reminders, Attachment Optionshttp://www.slovaktech.com/products.htm

wrote in message

ups.com...

I am currently developing an add-in in c# for Outlook 2003 and have
encountered a couple of issues. I believe they are not directly
connected to the add-in, but I have seen some strange things happen
before....


Connected to the server, the user might want to rename his IMAP
folders. Most of the folders are not supposed to be renamed from the
client, and these restrictions have been set on the server.
So when the client tries to rename a folder, the client asks the
server if it is ok, and the server returns with the result and the
folder is not renamed. The problem appears if the user tries to rename
the same folder twice in a row. The second time the client (Outlook)
does NOT send a request to the server and instead it shuts the
connection down and all functionality just stops working.
Is there ANYTHING I can do with my add-in to fix this issue? Or
anything I can do anywhere else? My users are definitely not happy
about this bug.


My second problem is similar, something I don't see I can fix with my
add-in, but perhaps MIGHT be fixed with my add-in after all..
I got a default view on my folders, with a lot of custom fields to
show to the user.
The default behavior is to use ... and arrange the view by Date. Now,
if I right click on a column and set it the view to be arranged by
date, it works as it should. The view is group up and shows Today,
Yesterday etc. This is fine as long as I stay in this folder. If I
switch to another folder and back, the view is still group by Date,
but instead of the actual days and dates it says "Date: None" in every
bracket. By default, it always says None until I actively sets the
grouping.


Any suggestions?


Ads