Home All Groups Group Topic Archive Search About

Outlook.MaiIteml.Move: The RPC server is not available

Author
31 Jan 2006 2:43 PM
Pieter
Hi,

On the pc of one of my clients (W2000, Office 2003) I'm getting sometimes an
exception when moving (Move) a MailItem to an Outlook-Folder: The RPC server
is not available. (Exception from HRESULT: 0x800706BA). The client has all
the updates/service packs/ etc isntalled...

Does anybody has any idea why this happens? Any help our hints would be
really appreciated! what is that RPC server thing?

Thanks a lot in advance,

Pieter


This is what I do in my application (VB.NET 2005):
    Private oItem As Outlook.MailItem

    strStatus = "MOVE"

    If (oFolder.StoreID <> clsDocShared.GlobalDoc.MyOutlookFolder.StoreID)
Or (oFolder.EntryID <> clsDocShared.GlobalDoc.MyOutlookFolder.EntryID) Then

        'Move it to the right folder: StoreID

        strStatus = "MOVE1"

        oItem = oItem.Move(clsDocShared.GlobalDoc.MyOutlookFolder)

        strStatus = "MOVE2"

    End If


The whole exception:
The RPC server is not available. (Exception from HRESULT: 0x800706BA)
   at System.RuntimeType.InvokeDispMethod(String name, BindingFlags
invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers, Int32
culture, String[] namedParameters)
   at System.RuntimeType.InvokeMember(String name, BindingFlags
bindingFlags, Binder binder, Object target, Object[] providedArgs,
ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
   at Microsoft.VisualBasic.CompilerServices.VBBinder.InvokeMember(String
name, BindingFlags invokeAttr, Type objType, IReflect objIReflect, Object
target, Object[] args, String[] namedParameters)
   at Microsoft.VisualBasic.CompilerServices.LateBinding.LateGet(Object o,
Type objType, String name, Object[] args, String[] paramnames, Boolean[]
CopyBack)
   at Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateGet(Object
Instance, Type Type, String MemberName, Object[] Arguments, String[]
ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack)
   at DocControl.clsDocMail.GetMailInfo(Boolean blnMove)

Author
31 Jan 2006 5:50 PM
Sue Mosher [MVP-Outlook]
What is the user's mail account configuration? (Exchange uses RPC.) In what part of the Outlook folder hierarchy is the target folder located?

FYI, there is a newsgroup specifically for general Outlook programming issues "down the hall" at microsoft.public.outlook.program_vba or, via web interface, at http://www.microsoft.com/office/community/en-us/default.mspx?dg=microsoft.public.outlook.program_vba

--
Sue Mosher, Outlook MVP
   Author of Configuring Microsoft Outlook 2003
     http://www.turtleflock.com/olconfig/index.htm
   and Microsoft Outlook Programming - Jumpstart for
     Administrators, Power Users, and Developers
     http://www.outlookcode.com/jumpstart.aspx


Show quote
"Pieter" <pietercou***@hotmail.com> wrote in message news:uUGPpSnJGHA.3064@TK2MSFTNGP10.phx.gbl...
> Hi,
>
> On the pc of one of my clients (W2000, Office 2003) I'm getting sometimes an
> exception when moving (Move) a MailItem to an Outlook-Folder: The RPC server
> is not available. (Exception from HRESULT: 0x800706BA). The client has all
> the updates/service packs/ etc isntalled...
>
> Does anybody has any idea why this happens? Any help our hints would be
> really appreciated! what is that RPC server thing?
>
> Thanks a lot in advance,
>
> Pieter
>
>
> This is what I do in my application (VB.NET 2005):
>    Private oItem As Outlook.MailItem
>
>    strStatus = "MOVE"
>
>    If (oFolder.StoreID <> clsDocShared.GlobalDoc.MyOutlookFolder.StoreID)
> Or (oFolder.EntryID <> clsDocShared.GlobalDoc.MyOutlookFolder.EntryID) Then
>
>        'Move it to the right folder: StoreID
>
>        strStatus = "MOVE1"
>
>        oItem = oItem.Move(clsDocShared.GlobalDoc.MyOutlookFolder)
>
>        strStatus = "MOVE2"
>
>    End If
>
>
> The whole exception:
> The RPC server is not available. (Exception from HRESULT: 0x800706BA)
>   at System.RuntimeType.InvokeDispMethod(String name, BindingFlags
> invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers, Int32
> culture, String[] namedParameters)
>   at System.RuntimeType.InvokeMember(String name, BindingFlags
> bindingFlags, Binder binder, Object target, Object[] providedArgs,
> ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
>   at Microsoft.VisualBasic.CompilerServices.VBBinder.InvokeMember(String
> name, BindingFlags invokeAttr, Type objType, IReflect objIReflect, Object
> target, Object[] args, String[] namedParameters)
>   at Microsoft.VisualBasic.CompilerServices.LateBinding.LateGet(Object o,
> Type objType, String name, Object[] args, String[] paramnames, Boolean[]
> CopyBack)
>   at Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateGet(Object
> Instance, Type Type, String MemberName, Object[] Arguments, String[]
> ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack)
>   at DocControl.clsDocMail.GetMailInfo(Boolean blnMove)
>
>
>
>
>
Author
1 Feb 2006 8:36 AM
Pieter
They actually do use Exchange.
The Move operation is from their personal MailBox (their own emails) or a
shared MailBox (which contains the incoming faxes) to a shared MailBox (so
everybody of the company has acess to the mail).

Is there any way to check if the RPC server is available? OR what happens
exactly with this exception so I can prevent it somehow? And why happens
this with this specific user?


"Sue Mosher [MVP-Outlook]" <sue***@outlookcode.com> wrote in message
news:e3cHv7oJGHA.516@TK2MSFTNGP15.phx.gbl...
What is the user's mail account configuration? (Exchange uses RPC.) In what
part of the Outlook folder hierarchy is the target folder located?

FYI, there is a newsgroup specifically for general Outlook programming
issues "down the hall" at microsoft.public.outlook.program_vba or, via web
interface, at
http://www.microsoft.com/office/community/en-us/default.mspx?dg=microsoft.public.outlook.program_vba

--
Sue Mosher, Outlook MVP
   Author of Configuring Microsoft Outlook 2003
     http://www.turtleflock.com/olconfig/index.htm
   and Microsoft Outlook Programming - Jumpstart for
     Administrators, Power Users, and Developers
     http://www.outlookcode.com/jumpstart.aspx


Show quote
"Pieter" <pietercou***@hotmail.com> wrote in message
news:uUGPpSnJGHA.3064@TK2MSFTNGP10.phx.gbl...
> Hi,
>
> On the pc of one of my clients (W2000, Office 2003) I'm getting sometimes
> an
> exception when moving (Move) a MailItem to an Outlook-Folder: The RPC
> server
> is not available. (Exception from HRESULT: 0x800706BA). The client has all
> the updates/service packs/ etc isntalled...
>
> Does anybody has any idea why this happens? Any help our hints would be
> really appreciated! what is that RPC server thing?
>
> Thanks a lot in advance,
>
> Pieter
>
>
> This is what I do in my application (VB.NET 2005):
>    Private oItem As Outlook.MailItem
>
>    strStatus = "MOVE"
>
>    If (oFolder.StoreID <> clsDocShared.GlobalDoc.MyOutlookFolder.StoreID)
> Or (oFolder.EntryID <> clsDocShared.GlobalDoc.MyOutlookFolder.EntryID)
> Then
>
>        'Move it to the right folder: StoreID
>
>        strStatus = "MOVE1"
>
>        oItem = oItem.Move(clsDocShared.GlobalDoc.MyOutlookFolder)
>
>        strStatus = "MOVE2"
>
>    End If
>
>
> The whole exception:
> The RPC server is not available. (Exception from HRESULT: 0x800706BA)
>   at System.RuntimeType.InvokeDispMethod(String name, BindingFlags
> invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers, Int32
> culture, String[] namedParameters)
>   at System.RuntimeType.InvokeMember(String name, BindingFlags
> bindingFlags, Binder binder, Object target, Object[] providedArgs,
> ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
>   at Microsoft.VisualBasic.CompilerServices.VBBinder.InvokeMember(String
> name, BindingFlags invokeAttr, Type objType, IReflect objIReflect, Object
> target, Object[] args, String[] namedParameters)
>   at Microsoft.VisualBasic.CompilerServices.LateBinding.LateGet(Object o,
> Type objType, String name, Object[] args, String[] paramnames, Boolean[]
> CopyBack)
>   at Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateGet(Object
> Instance, Type Type, String MemberName, Object[] Arguments, String[]
> ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack)
>   at DocControl.clsDocMail.GetMailInfo(Boolean blnMove)
>
>
>
>
>
Author
1 Feb 2006 8:36 AM
Pieter
They actually do use Exchange.
The Move operation is from their personal MailBox (their own emails) or a
shared MailBox (which contains the incoming faxes) to a shared MailBox (so
everybody of the company has acess to the mail).

Is there any way to check if the RPC server is available? OR what happens
exactly with this exception so I can prevent it somehow? And why happens
this with this specific user?


"Sue Mosher [MVP-Outlook]" <sue***@outlookcode.com> wrote in message
news:e3cHv7oJGHA.516@TK2MSFTNGP15.phx.gbl...
What is the user's mail account configuration? (Exchange uses RPC.) In what
part of the Outlook folder hierarchy is the target folder located?

FYI, there is a newsgroup specifically for general Outlook programming
issues "down the hall" at microsoft.public.outlook.program_vba or, via web
interface, at
http://www.microsoft.com/office/community/en-us/default.mspx?dg=microsoft.public.outlook.program_vba

--
Sue Mosher, Outlook MVP
   Author of Configuring Microsoft Outlook 2003
     http://www.turtleflock.com/olconfig/index.htm
   and Microsoft Outlook Programming - Jumpstart for
     Administrators, Power Users, and Developers
     http://www.outlookcode.com/jumpstart.aspx


Show quote
"Pieter" <pietercou***@hotmail.com> wrote in message
news:uUGPpSnJGHA.3064@TK2MSFTNGP10.phx.gbl...
> Hi,
>
> On the pc of one of my clients (W2000, Office 2003) I'm getting sometimes
> an
> exception when moving (Move) a MailItem to an Outlook-Folder: The RPC
> server
> is not available. (Exception from HRESULT: 0x800706BA). The client has all
> the updates/service packs/ etc isntalled...
>
> Does anybody has any idea why this happens? Any help our hints would be
> really appreciated! what is that RPC server thing?
>
> Thanks a lot in advance,
>
> Pieter
>
>
> This is what I do in my application (VB.NET 2005):
>    Private oItem As Outlook.MailItem
>
>    strStatus = "MOVE"
>
>    If (oFolder.StoreID <> clsDocShared.GlobalDoc.MyOutlookFolder.StoreID)
> Or (oFolder.EntryID <> clsDocShared.GlobalDoc.MyOutlookFolder.EntryID)
> Then
>
>        'Move it to the right folder: StoreID
>
>        strStatus = "MOVE1"
>
>        oItem = oItem.Move(clsDocShared.GlobalDoc.MyOutlookFolder)
>
>        strStatus = "MOVE2"
>
>    End If
>
>
> The whole exception:
> The RPC server is not available. (Exception from HRESULT: 0x800706BA)
>   at System.RuntimeType.InvokeDispMethod(String name, BindingFlags
> invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers, Int32
> culture, String[] namedParameters)
>   at System.RuntimeType.InvokeMember(String name, BindingFlags
> bindingFlags, Binder binder, Object target, Object[] providedArgs,
> ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
>   at Microsoft.VisualBasic.CompilerServices.VBBinder.InvokeMember(String
> name, BindingFlags invokeAttr, Type objType, IReflect objIReflect, Object
> target, Object[] args, String[] namedParameters)
>   at Microsoft.VisualBasic.CompilerServices.LateBinding.LateGet(Object o,
> Type objType, String name, Object[] args, String[] paramnames, Boolean[]
> CopyBack)
>   at Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateGet(Object
> Instance, Type Type, String MemberName, Object[] Arguments, String[]
> ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack)
>   at DocControl.clsDocMail.GetMailInfo(Boolean blnMove)
>
>
>
>
>
Author
17 Mar 2006 1:48 PM
Ray
I am facing the same issue. the same code worked fine a while ago, suddenly
it is causing after accessing some messages an exception, they have to run
the application again many times to filter the messages correctly.

The same code works fine at my machine, and other machines, yet on client
side it gives the same RPC exception, Any ideas ?

Thanks,
Raed

Show quote
"Pieter" wrote:

> They actually do use Exchange.
> The Move operation is from their personal MailBox (their own emails) or a
> shared MailBox (which contains the incoming faxes) to a shared MailBox (so
> everybody of the company has acess to the mail).
>
> Is there any way to check if the RPC server is available? OR what happens
> exactly with this exception so I can prevent it somehow? And why happens
> this with this specific user?
>
>
> "Sue Mosher [MVP-Outlook]" <sue***@outlookcode.com> wrote in message
> news:e3cHv7oJGHA.516@TK2MSFTNGP15.phx.gbl...
> What is the user's mail account configuration? (Exchange uses RPC.) In what
> part of the Outlook folder hierarchy is the target folder located?
>
> FYI, there is a newsgroup specifically for general Outlook programming
> issues "down the hall" at microsoft.public.outlook.program_vba or, via web
> interface, at
> http://www.microsoft.com/office/community/en-us/default.mspx?dg=microsoft.public.outlook.program_vba
>
> --
> Sue Mosher, Outlook MVP
>    Author of Configuring Microsoft Outlook 2003
>      http://www.turtleflock.com/olconfig/index.htm
>    and Microsoft Outlook Programming - Jumpstart for
>      Administrators, Power Users, and Developers
>      http://www.outlookcode.com/jumpstart.aspx
>
>
> "Pieter" <pietercou***@hotmail.com> wrote in message
> news:uUGPpSnJGHA.3064@TK2MSFTNGP10.phx.gbl...
> > Hi,
> >
> > On the pc of one of my clients (W2000, Office 2003) I'm getting sometimes
> > an
> > exception when moving (Move) a MailItem to an Outlook-Folder: The RPC
> > server
> > is not available. (Exception from HRESULT: 0x800706BA). The client has all
> > the updates/service packs/ etc isntalled...
> >
> > Does anybody has any idea why this happens? Any help our hints would be
> > really appreciated! what is that RPC server thing?
> >
> > Thanks a lot in advance,
> >
> > Pieter
> >
> >
> > This is what I do in my application (VB.NET 2005):
> >    Private oItem As Outlook.MailItem
> >
> >    strStatus = "MOVE"
> >
> >    If (oFolder.StoreID <> clsDocShared.GlobalDoc.MyOutlookFolder.StoreID)
> > Or (oFolder.EntryID <> clsDocShared.GlobalDoc.MyOutlookFolder.EntryID)
> > Then
> >
> >        'Move it to the right folder: StoreID
> >
> >        strStatus = "MOVE1"
> >
> >        oItem = oItem.Move(clsDocShared.GlobalDoc.MyOutlookFolder)
> >
> >        strStatus = "MOVE2"
> >
> >    End If
> >
> >
> > The whole exception:
> > The RPC server is not available. (Exception from HRESULT: 0x800706BA)
> >   at System.RuntimeType.InvokeDispMethod(String name, BindingFlags
> > invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers, Int32
> > culture, String[] namedParameters)
> >   at System.RuntimeType.InvokeMember(String name, BindingFlags
> > bindingFlags, Binder binder, Object target, Object[] providedArgs,
> > ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
> >   at Microsoft.VisualBasic.CompilerServices.VBBinder.InvokeMember(String
> > name, BindingFlags invokeAttr, Type objType, IReflect objIReflect, Object
> > target, Object[] args, String[] namedParameters)
> >   at Microsoft.VisualBasic.CompilerServices.LateBinding.LateGet(Object o,
> > Type objType, String name, Object[] args, String[] paramnames, Boolean[]
> > CopyBack)
> >   at Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateGet(Object
> > Instance, Type Type, String MemberName, Object[] Arguments, String[]
> > ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack)
> >   at DocControl.clsDocMail.GetMailInfo(Boolean blnMove)
> >
> >
> >
> >
> >
>
>
>
Author
17 Mar 2006 1:48 PM
Ray
I am facing the same issue. the same code worked fine a while ago, suddenly
it is causing after accessing some messages an exception, they have to run
the application again many times to filter the messages correctly.

The same code works fine at my machine, and other machines, yet on client
side it gives the same RPC exception, Any ideas ?

Thanks,
Raed

Show quote
"Pieter" wrote:

> They actually do use Exchange.
> The Move operation is from their personal MailBox (their own emails) or a
> shared MailBox (which contains the incoming faxes) to a shared MailBox (so
> everybody of the company has acess to the mail).
>
> Is there any way to check if the RPC server is available? OR what happens
> exactly with this exception so I can prevent it somehow? And why happens
> this with this specific user?
>
>
> "Sue Mosher [MVP-Outlook]" <sue***@outlookcode.com> wrote in message
> news:e3cHv7oJGHA.516@TK2MSFTNGP15.phx.gbl...
> What is the user's mail account configuration? (Exchange uses RPC.) In what
> part of the Outlook folder hierarchy is the target folder located?
>
> FYI, there is a newsgroup specifically for general Outlook programming
> issues "down the hall" at microsoft.public.outlook.program_vba or, via web
> interface, at
> http://www.microsoft.com/office/community/en-us/default.mspx?dg=microsoft.public.outlook.program_vba
>
> --
> Sue Mosher, Outlook MVP
>    Author of Configuring Microsoft Outlook 2003
>      http://www.turtleflock.com/olconfig/index.htm
>    and Microsoft Outlook Programming - Jumpstart for
>      Administrators, Power Users, and Developers
>      http://www.outlookcode.com/jumpstart.aspx
>
>
> "Pieter" <pietercou***@hotmail.com> wrote in message
> news:uUGPpSnJGHA.3064@TK2MSFTNGP10.phx.gbl...
> > Hi,
> >
> > On the pc of one of my clients (W2000, Office 2003) I'm getting sometimes
> > an
> > exception when moving (Move) a MailItem to an Outlook-Folder: The RPC
> > server
> > is not available. (Exception from HRESULT: 0x800706BA). The client has all
> > the updates/service packs/ etc isntalled...
> >
> > Does anybody has any idea why this happens? Any help our hints would be
> > really appreciated! what is that RPC server thing?
> >
> > Thanks a lot in advance,
> >
> > Pieter
> >
> >
> > This is what I do in my application (VB.NET 2005):
> >    Private oItem As Outlook.MailItem
> >
> >    strStatus = "MOVE"
> >
> >    If (oFolder.StoreID <> clsDocShared.GlobalDoc.MyOutlookFolder.StoreID)
> > Or (oFolder.EntryID <> clsDocShared.GlobalDoc.MyOutlookFolder.EntryID)
> > Then
> >
> >        'Move it to the right folder: StoreID
> >
> >        strStatus = "MOVE1"
> >
> >        oItem = oItem.Move(clsDocShared.GlobalDoc.MyOutlookFolder)
> >
> >        strStatus = "MOVE2"
> >
> >    End If
> >
> >
> > The whole exception:
> > The RPC server is not available. (Exception from HRESULT: 0x800706BA)
> >   at System.RuntimeType.InvokeDispMethod(String name, BindingFlags
> > invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers, Int32
> > culture, String[] namedParameters)
> >   at System.RuntimeType.InvokeMember(String name, BindingFlags
> > bindingFlags, Binder binder, Object target, Object[] providedArgs,
> > ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
> >   at Microsoft.VisualBasic.CompilerServices.VBBinder.InvokeMember(String
> > name, BindingFlags invokeAttr, Type objType, IReflect objIReflect, Object
> > target, Object[] args, String[] namedParameters)
> >   at Microsoft.VisualBasic.CompilerServices.LateBinding.LateGet(Object o,
> > Type objType, String name, Object[] args, String[] paramnames, Boolean[]
> > CopyBack)
> >   at Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateGet(Object
> > Instance, Type Type, String MemberName, Object[] Arguments, String[]
> > ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack)
> >   at DocControl.clsDocMail.GetMailInfo(Boolean blnMove)
> >
> >
> >
> >
> >
>
>
>
Author
17 Mar 2006 3:43 PM
Pieter
I'm sorry, but I still didn't find a solution.
Although, It seems only to happen when using handling the
Outlook.Items.ItemAdd-event...

Like this:
Private WithEvents colSentItems As Outlook.Items

Private Sub frmMain_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Load
Dim olNs As Outlook.NameSpace
        Dim oApp As Outlook.Application
        oApp = New Outlook.Application
        olNs = oApp.GetNamespace("MAPI")
        colSentItems =
olNs.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderSentMail).Items
        olNs = Nothing
        oApp = Nothing
End Sub

Private Sub frmMain_FormClosing(ByVal sender As Object, ByVal e As
System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
        Try
            colSentItems = Nothing
        Catch ex As Exception
            ErrorMessage(ex, "colSentItems = Nothing")
        End Try
End Sub

When the users gets the exception, it happens during the "colSentItems =
Nothing" in the frmMain_FormClosing...

I even formatted a pc, installed it freshly with XP and Office 2003, and
even there it got the error.


One possible solution in my opinion: Putting tyhis stuff in an
outlook-addin. But it's jsut a guess, and I didn't had the time yet to test
it...


In case you'll find something, I would be happy to know it :-)

hope this helps,

Pieter


Show quote
"Ray" <R**@discussions.microsoft.com> wrote in message
news:B78FF0D7-7F2E-4A4A-9D64-13D9DECFEF7D@microsoft.com...
>I am facing the same issue. the same code worked fine a while ago, suddenly
> it is causing after accessing some messages an exception, they have to run
> the application again many times to filter the messages correctly.
>
> The same code works fine at my machine, and other machines, yet on client
> side it gives the same RPC exception, Any ideas ?
>
> Thanks,
> Raed
>
> "Pieter" wrote:
>
>> They actually do use Exchange.
>> The Move operation is from their personal MailBox (their own emails) or a
>> shared MailBox (which contains the incoming faxes) to a shared MailBox
>> (so
>> everybody of the company has acess to the mail).
>>
>> Is there any way to check if the RPC server is available? OR what happens
>> exactly with this exception so I can prevent it somehow? And why happens
>> this with this specific user?
>>
>>
>> "Sue Mosher [MVP-Outlook]" <sue***@outlookcode.com> wrote in message
>> news:e3cHv7oJGHA.516@TK2MSFTNGP15.phx.gbl...
>> What is the user's mail account configuration? (Exchange uses RPC.) In
>> what
>> part of the Outlook folder hierarchy is the target folder located?
>>
>> FYI, there is a newsgroup specifically for general Outlook programming
>> issues "down the hall" at microsoft.public.outlook.program_vba or, via
>> web
>> interface, at
>> http://www.microsoft.com/office/community/en-us/default.mspx?dg=microsoft.public.outlook.program_vba
>>
>> --
>> Sue Mosher, Outlook MVP
>>    Author of Configuring Microsoft Outlook 2003
>>      http://www.turtleflock.com/olconfig/index.htm
>>    and Microsoft Outlook Programming - Jumpstart for
>>      Administrators, Power Users, and Developers
>>      http://www.outlookcode.com/jumpstart.aspx
>>
>>
>> "Pieter" <pietercou***@hotmail.com> wrote in message
>> news:uUGPpSnJGHA.3064@TK2MSFTNGP10.phx.gbl...
>> > Hi,
>> >
>> > On the pc of one of my clients (W2000, Office 2003) I'm getting
>> > sometimes
>> > an
>> > exception when moving (Move) a MailItem to an Outlook-Folder: The RPC
>> > server
>> > is not available. (Exception from HRESULT: 0x800706BA). The client has
>> > all
>> > the updates/service packs/ etc isntalled...
>> >
>> > Does anybody has any idea why this happens? Any help our hints would be
>> > really appreciated! what is that RPC server thing?
>> >
>> > Thanks a lot in advance,
>> >
>> > Pieter
>> >
>> >
>> > This is what I do in my application (VB.NET 2005):
>> >    Private oItem As Outlook.MailItem
>> >
>> >    strStatus = "MOVE"
>> >
>> >    If (oFolder.StoreID <>
>> > clsDocShared.GlobalDoc.MyOutlookFolder.StoreID)
>> > Or (oFolder.EntryID <> clsDocShared.GlobalDoc.MyOutlookFolder.EntryID)
>> > Then
>> >
>> >        'Move it to the right folder: StoreID
>> >
>> >        strStatus = "MOVE1"
>> >
>> >        oItem = oItem.Move(clsDocShared.GlobalDoc.MyOutlookFolder)
>> >
>> >        strStatus = "MOVE2"
>> >
>> >    End If
>> >
>> >
>> > The whole exception:
>> > The RPC server is not available. (Exception from HRESULT: 0x800706BA)
>> >   at System.RuntimeType.InvokeDispMethod(String name, BindingFlags
>> > invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers,
>> > Int32
>> > culture, String[] namedParameters)
>> >   at System.RuntimeType.InvokeMember(String name, BindingFlags
>> > bindingFlags, Binder binder, Object target, Object[] providedArgs,
>> > ParameterModifier[] modifiers, CultureInfo culture, String[]
>> > namedParams)
>> >   at
>> > Microsoft.VisualBasic.CompilerServices.VBBinder.InvokeMember(String
>> > name, BindingFlags invokeAttr, Type objType, IReflect objIReflect,
>> > Object
>> > target, Object[] args, String[] namedParameters)
>> >   at Microsoft.VisualBasic.CompilerServices.LateBinding.LateGet(Object
>> > o,
>> > Type objType, String name, Object[] args, String[] paramnames,
>> > Boolean[]
>> > CopyBack)
>> >   at
>> > Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateGet(Object
>> > Instance, Type Type, String MemberName, Object[] Arguments, String[]
>> > ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack)
>> >   at DocControl.clsDocMail.GetMailInfo(Boolean blnMove)
>> >
>> >
>> >
>> >
>> >
>>
>>
>>
Author
17 Mar 2006 3:43 PM
Pieter
I'm sorry, but I still didn't find a solution.
Although, It seems only to happen when using handling the
Outlook.Items.ItemAdd-event...

Like this:
Private WithEvents colSentItems As Outlook.Items

Private Sub frmMain_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Load
Dim olNs As Outlook.NameSpace
        Dim oApp As Outlook.Application
        oApp = New Outlook.Application
        olNs = oApp.GetNamespace("MAPI")
        colSentItems =
olNs.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderSentMail).Items
        olNs = Nothing
        oApp = Nothing
End Sub

Private Sub frmMain_FormClosing(ByVal sender As Object, ByVal e As
System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
        Try
            colSentItems = Nothing
        Catch ex As Exception
            ErrorMessage(ex, "colSentItems = Nothing")
        End Try
End Sub

When the users gets the exception, it happens during the "colSentItems =
Nothing" in the frmMain_FormClosing...

I even formatted a pc, installed it freshly with XP and Office 2003, and
even there it got the error.


One possible solution in my opinion: Putting tyhis stuff in an
outlook-addin. But it's jsut a guess, and I didn't had the time yet to test
it...


In case you'll find something, I would be happy to know it :-)

hope this helps,

Pieter


Show quote
"Ray" <R**@discussions.microsoft.com> wrote in message
news:B78FF0D7-7F2E-4A4A-9D64-13D9DECFEF7D@microsoft.com...
>I am facing the same issue. the same code worked fine a while ago, suddenly
> it is causing after accessing some messages an exception, they have to run
> the application again many times to filter the messages correctly.
>
> The same code works fine at my machine, and other machines, yet on client
> side it gives the same RPC exception, Any ideas ?
>
> Thanks,
> Raed
>
> "Pieter" wrote:
>
>> They actually do use Exchange.
>> The Move operation is from their personal MailBox (their own emails) or a
>> shared MailBox (which contains the incoming faxes) to a shared MailBox
>> (so
>> everybody of the company has acess to the mail).
>>
>> Is there any way to check if the RPC server is available? OR what happens
>> exactly with this exception so I can prevent it somehow? And why happens
>> this with this specific user?
>>
>>
>> "Sue Mosher [MVP-Outlook]" <sue***@outlookcode.com> wrote in message
>> news:e3cHv7oJGHA.516@TK2MSFTNGP15.phx.gbl...
>> What is the user's mail account configuration? (Exchange uses RPC.) In
>> what
>> part of the Outlook folder hierarchy is the target folder located?
>>
>> FYI, there is a newsgroup specifically for general Outlook programming
>> issues "down the hall" at microsoft.public.outlook.program_vba or, via
>> web
>> interface, at
>> http://www.microsoft.com/office/community/en-us/default.mspx?dg=microsoft.public.outlook.program_vba
>>
>> --
>> Sue Mosher, Outlook MVP
>>    Author of Configuring Microsoft Outlook 2003
>>      http://www.turtleflock.com/olconfig/index.htm
>>    and Microsoft Outlook Programming - Jumpstart for
>>      Administrators, Power Users, and Developers
>>      http://www.outlookcode.com/jumpstart.aspx
>>
>>
>> "Pieter" <pietercou***@hotmail.com> wrote in message
>> news:uUGPpSnJGHA.3064@TK2MSFTNGP10.phx.gbl...
>> > Hi,
>> >
>> > On the pc of one of my clients (W2000, Office 2003) I'm getting
>> > sometimes
>> > an
>> > exception when moving (Move) a MailItem to an Outlook-Folder: The RPC
>> > server
>> > is not available. (Exception from HRESULT: 0x800706BA). The client has
>> > all
>> > the updates/service packs/ etc isntalled...
>> >
>> > Does anybody has any idea why this happens? Any help our hints would be
>> > really appreciated! what is that RPC server thing?
>> >
>> > Thanks a lot in advance,
>> >
>> > Pieter
>> >
>> >
>> > This is what I do in my application (VB.NET 2005):
>> >    Private oItem As Outlook.MailItem
>> >
>> >    strStatus = "MOVE"
>> >
>> >    If (oFolder.StoreID <>
>> > clsDocShared.GlobalDoc.MyOutlookFolder.StoreID)
>> > Or (oFolder.EntryID <> clsDocShared.GlobalDoc.MyOutlookFolder.EntryID)
>> > Then
>> >
>> >        'Move it to the right folder: StoreID
>> >
>> >        strStatus = "MOVE1"
>> >
>> >        oItem = oItem.Move(clsDocShared.GlobalDoc.MyOutlookFolder)
>> >
>> >        strStatus = "MOVE2"
>> >
>> >    End If
>> >
>> >
>> > The whole exception:
>> > The RPC server is not available. (Exception from HRESULT: 0x800706BA)
>> >   at System.RuntimeType.InvokeDispMethod(String name, BindingFlags
>> > invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers,
>> > Int32
>> > culture, String[] namedParameters)
>> >   at System.RuntimeType.InvokeMember(String name, BindingFlags
>> > bindingFlags, Binder binder, Object target, Object[] providedArgs,
>> > ParameterModifier[] modifiers, CultureInfo culture, String[]
>> > namedParams)
>> >   at
>> > Microsoft.VisualBasic.CompilerServices.VBBinder.InvokeMember(String
>> > name, BindingFlags invokeAttr, Type objType, IReflect objIReflect,
>> > Object
>> > target, Object[] args, String[] namedParameters)
>> >   at Microsoft.VisualBasic.CompilerServices.LateBinding.LateGet(Object
>> > o,
>> > Type objType, String name, Object[] args, String[] paramnames,
>> > Boolean[]
>> > CopyBack)
>> >   at
>> > Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateGet(Object
>> > Instance, Type Type, String MemberName, Object[] Arguments, String[]
>> > ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack)
>> >   at DocControl.clsDocMail.GetMailInfo(Boolean blnMove)
>> >
>> >
>> >
>> >
>> >
>>
>>
>>

AddThis Social Bookmark Button