Outlook 2003: Problems with adding new global view programmatically via addin

G

Guest

Hi,

I am developing an addin in c#.NET (for Outlook 2003), that will allow the
user to copy view settings from one folder to another. To do so, i am coping
the source folder's viewstyle (XML) to a new global view
(olViewSaveOptionAllFoldersOfType as SaveOption), that i am adding and
applying to the target folder. It worls ok the first time, but when i click
on the add-in button second time, the target folder's view is not set to my
global view. On debugging, i noticed that when i have added a new global
view, on the source folder's views collection, this does not seem to appear
on the target folder's views collection and thus i am not able to set it.

But on finishing the execution, if i go via View -> Arrange By -> Current
View on the target folder, the new view is there. And also, the first time
i execute teh add-in, the new global view is indeed appearing on the target
folder's list. I am totally confused as to why this is happenning. There
seems to be some problems with refreshing. Can somebody help me out here??

Thanks in advance.
Regards,
Laks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top