A Microsoft Outlook email forum. Outlook Banter

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.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Add-ins for Outlook
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Exception from HRESULT



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old May 10th 06, 08:54 PM posted to microsoft.public.outlook.program_addins
Laks
external usenet poster
 
Posts: 5
Default Exception from HRESULT

Hi,

I have an Outlook Add-In that modifies views. This add-in directly
manipulates the view XML and then saves the view.

On one particular machine, what happens when the add-in tries to save
the view, I get the following exception... again and again....

Exception from HRESULT: 0xAF604005., Exception from HRESULT:
0xBDC04005. and so on...... I seriously do not know what's going wrong
here.... because this add-in works like a charm on all other
machines.....

Help greatly appreciated......

Thanks and Regards,
Laks

Ads
  #2  
Old May 11th 06, 09:24 AM posted to microsoft.public.outlook.program_addins
Laks
external usenet poster
 
Posts: 5
Default Exception from HRESULT

Hi,

I forgot to mention that I am using VS .NET 2003, OL2003. And also that
I am getting a different number with the HRESULT each time, for the
saem save...

I scan all global mail and post views, reset autogroup and save them.
Also, I am iterating thtough all the folders, getting all folder
specific views and resetting autogrouping in them and saving it.

Here's the code that I am using

// Global views

foreach(Microsoft.Office.Interop.Outlook.View objView in views) {
if(objView.SaveOption ==
OlViewSaveOption.olViewSaveOptionAllFoldersOfType) {
objView.XML = objView.XML.Replace("autogroup1/autogroup",
"autogroup0/autogroup");
try {
objView.Save();
} catch (System.Exception ex) {
// Here's where I am getting the HRESULT....
}
}
}

// Folder specific views
private void IterateFolders (Folders folders) {
foreach(MAPIFolder folder in folders) {
if(folder.Name.CompareTo("Public Folders")!= 0) {
Views views = folder.Views;
foreach(Microsoft.Office.Interop.Outlook.View objView in
views) {
objView.XML =
objView.XML.Replace("autogroup1/autogroup",
"autogroup0/autogroup");
try {
objView.Save();
} catch(System.Exception ex) {
// Here's where I am getting the HRESULT....
}
} // end of foreach views
} // end of IF
IterateFolders(folder.Folders); // recurse here
}
}

This error is occurring repeatdly and consistently with a particular
profile and is fine on all other profiles.... this particular profile
contains a huge number of folders (of the order of 600 - 700)....

Also a 'Microsoft Outlook: Operation Failed' COMException occurs for
this particular profile whenever I try and iterate the complete folder
list in a manner illestrated above...

Thanks in Advance,
Laks

 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
unhandled exception in outlook.exe (MSPST32.DLL) JOE Outlook - Calandaring 7 May 1st 06 05:54 PM
Exception at item display Yury Kudryashov Add-ins for Outlook 0 March 13th 06 06:12 PM
unknown exception error in Exchange Environment Michael Anderson Outlook and VBA 3 February 28th 06 08:25 PM
The folder is full exception jim Add-ins for Outlook 1 January 16th 06 04:27 PM
Got exception while QueryInteface Vinayakc Add-ins for Outlook 0 January 13th 06 08:44 AM


All times are GMT +1. The time now is 09:05 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.