使用Outlook 2003主互操作程序集(PIA)执行VB.NET 2005 exe时,在安装了Outlook 2007的Windows 7计算机上进行远程过程调用失败 [英] Remote Procedure Call failed, on Windows 7 machine w/Outlook 2007 installed, when executing VB.NET 2005 exe using Outlook 2003 Primary Interop Assemblies (PIA)

查看:149
本文介绍了使用Outlook 2003主互操作程序集(PIA)执行VB.NET 2005 exe时,在安装了Outlook 2007的Windows 7计算机上进行远程过程调用失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们的VB.NET 2005程序引用了Outlook 2003主互操作程序集为了让我们的自定义软件生成并发送电子邮件。 我们使用后期绑定。 
此过程适用于安装了Outlook 2003或Outlook 2007的客户端计算机。 适用于XP& Vista机器。


但是,我们遇到安装了Outlook 2007的Windows 7(32位)计算机的问题。
 该过程有效在我尝试使用我们的VB.NET 2005程序通过我们的自定义软件发送电子邮件之前,Outlook 2007已打开。它失败了,并且"com
异常–远程程序调用失败”错误,如果我尝试使用自定义软件发送电子邮件时Outlook 2007未打开。
 


< span style ="font-size:10pt">这里&ssquo; s是关于这个问题的更多信息:



1.  我进入Windows 7(32位)PC,作为域管理员组的一部分


2.  
打开Outlook 2007


3.  
选择从我们的自定义软件发送电子邮件的选项。


4.  
Outlook打开并显示要发送的消息。


5.  
我点击发送并提示我登录交换服务器,我这样做。


6.  
我的VB.NET程序(从我们的自定义软件调用)开始汇编电子邮件。


7. < span style =""> 
  这个过程是卡在这一点上,我的任务栏上不再出现前景。


8。
  我进入任务管理器并结束outlook.exe进程。虽然Outlook看起来并不开放(它不在我的任务栏上),但它仍然在后台运行。


9 。 
我收到以下远程过程调用失败错误:


COMException–远程过程调用失败。 (HRESULT异常:0x800706BE)


STACKTRACE: 
at Microsoft.VisualBasic.CompilerServices.LateBinding.InternalLateCall(Object o,Type objType,String name,Object [] args,String [] paramnames,Boolean [] CopyBack,Boolean IgnoreReturn)



Microsoft.VisualBasic.CompilerServices.NewLateBinding .LateCall(Object Instance,Type Type,String MemberName,Object [] Arguments,String [] ArgumentNames,Type [] TypeArguments,
Boolean [] CopyBack,Boolean IgnoreReturn)


 


< p style ="margin:0in 0in 0pt"> 只有选项才能点击OK按钮。


9.  
我点击确定。


10.继续处理,不发送电子邮件。



关于什么导致问题的任何想法?

解决方案

您好,


<<它失败并显示"com异常–远程过程调用失败”错误,如果我尝试从我们的自定义软件发送电子邮件时Outlook 2007未打开。  >>

很抱歉延迟。来自请确保之前已启动Outlook应用程序。执行步骤6后,此Outlook应用程序将在后台运行。您是否已按照其他系统中的这些步骤进行操作?
此行为是否也是如此在这个Windows 7系统中,您可以尝试重新安装Office 2007 PIA。另一种方法是引用您打算自动化的最早版本Office应用程序的类型库。我不确定这个问题是否是
与后期绑定有关。为此,请参阅此知识库文章:
http://support.microsoft。 com / kb / 244167


实际上,这个论坛不是关于Outlook自动化问题的最佳地点。为了获得更好的支持,我建议你在office.developer中询问.automation newsgroup

http://www.microsoft.com/office/community/ en-us / default.mspx?dg = microsoft.public.office.developer.automation& lang = en& cr = US
这将是这个问题的最佳位置。


Our VB.NET 2005 program references Outlook 2003 Primary Interop Assemblies in order for our custom software to generate and send an email.  We use late binding.  This process has worked fine for client machines with either Outlook 2003 or Outlook 2007 installed.  And, works for XP & Vista machines.

However, we are having an issue with a Windows 7 (32-bit) machine that has Outlook 2007 installed.  The process works if Outlook 2007 is open before I try emailing via our custom software using our VB.NET 2005 program. It fails with a “com exception – remote procedure call failed” error, if Outlook 2007 is not open when I try to email from our custom software. 

Here‘s is some more information with regard to this issue:

1.  I log into Windows 7 (32-bit) PC as part of the domain admins group

2.  Open Outlook 2007

3.  Select option to email from our custom software.

4.  Outlook opens and the message to be sent appears.

5.  I click send and am prompted to log on to the exchange server, which I do.

6.  My VB.NET program (called from our custom software) begins assembling the email.

7.   The process is stuck at this point and outlook no longer appears on my taskbar.

8.  I go into task manager and end outlook.exe process. Although outlook does not appear to be open (it’s not on my taskbar) it’s still running in the background.

9.  I get the following remote procedure call failed error:

COMException – The remote procedure call failed. (Exception from HRESULT: 0x800706BE)

STACKTRACE:  at Microsoft.VisualBasic.CompilerServices.LateBinding.InternalLateCall(Object o, Type objType, String name, Object[] args, String[] paramnames, Boolean[] CopyBack, Boolean IgnoreReturn)

At

Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateCall(Object Instance, Type Type, String MemberName, Object[] Arguments, String[] ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack, Boolean IgnoreReturn)

 

Only option is to click the OK button.

9.  I click ok.

10. Process continues, email is not sent.

Any ideas on what’s causing the problem?

解决方案

Hello,

<<It fails with a “com exception – remote procedure call failed” error, if Outlook 2007 is not open when I try to email from our custom software. >>
Sorry for delay. From this, please ensure that the Outlook Application has been launched before. After executing the step 6, this outlook application is run in the background. Have you followed these steps in other system? Does this behavior also appear? In this Windows 7 system, you could try to reinstall Office 2007 PIA. Another way is to reference the type library of the earliest version of the Office application you intend to Automate. I am not sure if this issue is related to be late binding. For this, please refer to this KB article: http://support.microsoft.com/kb/244167.

Actually, this forum is not the best place for questions concerning Outlook Automation. To get better support, I recommend you ask in office.developer.automation newsgroup
http://www.microsoft.com/office/community/en-us/default.mspx?dg=microsoft.public.office.developer.automation&lang=en&cr=US, which would be best place for this question.


这篇关于使用Outlook 2003主互操作程序集(PIA)执行VB.NET 2005 exe时,在安装了Outlook 2007的Windows 7计算机上进行远程过程调用失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆