![]() |
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 |
#1
|
|||
|
|||
![]()
Hi all,
I am trying to make an Outlook 2003 add-in using Visual Studio 2008 on Windows XP SP3. My add-in is using custom Folder Home Page which displays my custom form, which wraps Outlook View Control. When I try to set Folder property of the OVC, I get COM Exception with 'Unknown Error' description every time. I am using value of the CurrentFolder.FolderPath property of the active explorer: Outlook.Explorer currentExplorer = app.ActiveExplorer(); if (currentExplorer != null) { ovcWrapper.Folder = currentExplorer.CurrentFolder.FolderPath; } Folder is located in non-default PST file. I must underline that everything worked just fine before I went to holiday ![]() Thanks, Nenad |
Ads |
#2
|
|||
|
|||
![]()
After a while, I finally find out what was the problem: name of the external
storage cannot be 'Documents' ![]() During startup of the addin, it loads the non-default PST file, and changes its name (not the name of the pst file, but the name of the root folder) to "Documents". Well, it was allowed before, but now it is not - Outlook View Control throws an exception when you try to set a Folder property. This is lines of code which caused a problem: session.AddStore("C:\\test.pst"); // loads existing or creates a new one, if there is none. storage = session.Folders.GetLast(); // grabs root folder of the new fileStorage. if (storage.Name != storageName) // if fileStorage is brand new, it has default name. { storage.Name = "Documents"; session.RemoveStore(storage); // to apply new fileStorage name, it have to be removed and added again. session.AddStore(storagePath); } -- Nenad Dobrilovic "Nency" wrote: Hi all, I am trying to make an Outlook 2003 add-in using Visual Studio 2008 on Windows XP SP3. My add-in is using custom Folder Home Page which displays my custom form, which wraps Outlook View Control. When I try to set Folder property of the OVC, I get COM Exception with 'Unknown Error' description every time. I am using value of the CurrentFolder.FolderPath property of the active explorer: Outlook.Explorer currentExplorer = app.ActiveExplorer(); if (currentExplorer != null) { ovcWrapper.Folder = currentExplorer.CurrentFolder.FolderPath; } Folder is located in non-default PST file. I must underline that everything worked just fine before I went to holiday ![]() Thanks, Nenad |
#3
|
|||
|
|||
![]()
I have some clarification regarding my solution to the issue. Problem is not
in the specific name of the storage (I mentioned "Documents") but in the fact that, for some reason, any name of the storage become a problem. When I change a name of the external storage (see code above) to be some new, everything works fine for some time, but than suddenly, unknown COM exception shows up. Than, I change a name of the storage to be something new (not 'Documents' but 'Test' for example) and everything works fine again for some time. -- Nenad Dobrilovic "Nenad Dobrilovic" wrote: After a while, I finally find out what was the problem: name of the external storage cannot be 'Documents' ![]() During startup of the addin, it loads the non-default PST file, and changes its name (not the name of the pst file, but the name of the root folder) to "Documents". Well, it was allowed before, but now it is not - Outlook View Control throws an exception when you try to set a Folder property. This is lines of code which caused a problem: session.AddStore("C:\\test.pst"); // loads existing or creates a new one, if there is none. storage = session.Folders.GetLast(); // grabs root folder of the new fileStorage. if (storage.Name != storageName) // if fileStorage is brand new, it has default name. { storage.Name = "Documents"; session.RemoveStore(storage); // to apply new fileStorage name, it have to be removed and added again. session.AddStore(storagePath); } -- Nenad Dobrilovic "Nency" wrote: Hi all, I am trying to make an Outlook 2003 add-in using Visual Studio 2008 on Windows XP SP3. My add-in is using custom Folder Home Page which displays my custom form, which wraps Outlook View Control. When I try to set Folder property of the OVC, I get COM Exception with 'Unknown Error' description every time. I am using value of the CurrentFolder.FolderPath property of the active explorer: Outlook.Explorer currentExplorer = app.ActiveExplorer(); if (currentExplorer != null) { ovcWrapper.Folder = currentExplorer.CurrentFolder.FolderPath; } Folder is located in non-default PST file. I must underline that everything worked just fine before I went to holiday ![]() Thanks, Nenad |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Replacing Folder View with Custom Control | DaveR | Add-ins for Outlook | 0 | November 14th 07 06:33 PM |
Outlook View Control | Joel Allen | Outlook and VBA | 5 | July 9th 07 11:10 PM |
Outlook View Control embedded in custom control | [email protected] | Outlook - General Queries | 1 | November 8th 06 11:41 AM |
Outlook View Control embedded in custom control | [email protected] | Outlook - Using Forms | 1 | November 8th 06 11:41 AM |
Changing property of control to all caps | Russ | Outlook - Using Forms | 10 | June 29th 06 04:21 PM |