On Jul 28, 4:13 pm, "
<kenslo...@mvps.org> wrote:
> The obvious question is if that MAPIFolder object is valid when you ask for
> the folder name? Do you check that? If it is a valid folder I can't thinkof
> a reason why the name isn't available.
> In general with COM addins you should be handling all possible errors. With
> managed code you have to do even more exception handling than you would with
> unmanaged code, things are less forgiving with managed code. You need to put
> try...catch blocks around any code that could fire an exception, and you
> need to test for things such as properties like EntryID. In unmanaged code
> an item that was never saved will have a null string EntryID, in managed
> code the property may not be there. So you'd need to test for
> String.IsNullOrEmpty().
> You should also not use compound dot operators, which create invisible
> variables you can't release, and which make it impossible to see exactly
> where any code is failing.
> >
> http://www.slovaktech.com
> "j" <Evgeny...@gmail.com> wrote in message
> news:cd8e6b28-3e41-416f-9f8f-716e808a37fb@r2g2000yqm.googlegroups.com...
>
> > Hi all.
>
> > I develop vsto addIn 2005, OL 2003, C# 2.0
>
> > One of my customer sometime got comException > > System.Runtime.InteropServices.COMException (0xB174010F): The
> > operation failed.
> > at Microsoft.Office.Interop.Outlook.MAPIFolder.get_Name()
>
> > In the code we try to get Folder's name.
>
> > Why this happen??
> > How can i recover from this error?? (otlook restart helps, but this is
> > not solution.)
>
> > Thanks in advance.-
Thanks for replay,
can please explain what you meant by saying :
> The obvious question is if that MAPIFolder object is valid when you ask for
> the folder name? Do you check that? If it is a valid folder I can't think of
> a reason why the name isn't available.
How should i check if this object valid??? some sample will help.
Also, some time i got comException when trying to access the toolbar:
"Microsoft.Office.Interop.Outlook.ExplorerClass.get_CommandBars"
what can i do on the subject.
Thanks.