Access / Office 2010自动化问题 [英] Access/Office 2010 Automation Problem

查看:84
本文介绍了Access / Office 2010自动化问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

无法找到我在安装Office 2010时从Access自动化Outlook(或Excel和Word)所遇到的问题的答案(我只尝试使用32位O2010)。

Having trouble locating an answer to the problem I am having with automating Outlook (or Excel and Word) from Access when Office 2010 is installed (I've only tried with 32bit O2010).

多年来,使用Outlook 2000,2002& 2003我使用下面的代码在Outlook中创建电子邮件:

For years, using Outlook 2000, 2002 & 2003 I've used the below code to create Emails in Outlook:

Dim objOutlook As Object

On Error Resume Next

'看看Outlook是否打开

设置objOutlook = GetObject(,"Outlook.Application")

Dim objOutlook As Object
On Error Resume Next
' See if Outlook is Open
Set objOutlook = GetObject(, "Outlook.Application")

'如果Outlook关闭,结果为429,那么打开Outlook

如果Err.Number = 429则为
   设置objOutlook = CreateObject(" Outlook.application")  ','LocalHost")

结束如果

' If Outlook is closed, 429 results, so then open Outlook
If Err.Number = 429 Then
    Set objOutlook = CreateObject("Outlook.application")  ', "LocalHost")
End If

在Office 2007及更低版本中,这适用于Windows XP,Vista和7各种风格。 使用Outlook 2010,"设置objOutlook"和"设置objOutlook"行失败,错误429(第二次调用,打开Outlook,如果Outlook打开或不执行,执行通常需要10秒
左右才能进入下一行代码)。 我已经在许多Windows 7机器(家庭版和专业版,32和64版)上尝试了这一点,所有这些都有相同的结果。

In Office 2007 and below, this works fine on Windows XP, Vista and 7 all flavors.  With Outlook 2010, both "Set objOutlook" lines fail with error 429 (the second call, to open Outlook, executes if Outlook is open or not and usually takes 10 seconds or so to move onto the next line of code).  I've tried this on numerous Windows 7 machines (home and pro, 32 & 64) all with the same results.

我读过一些DLL / OCX库功能的注释由于许可问题已从Office 2010中删除,但此后已丢失指向这些博客的链接。无论情况如何,无需购买第三方
软件,我可以使用什么方法来重获此问题自动化&NBSP?;感谢您的帮助。

I've read comments that some DLL/OCX library functionaliy has been removed from Office 2010 because of licensing issues, but have since lost the links to those blogs. Whatever the case may be, what workaround, without having to purchase third-party software, can I use to regain this automation?  Thanks for any help.

 

John

推荐答案

John,

当您在Access中运行该代码时,它实际上更像是一个特定于Outlook的问题IMO,因此我建议您也将此相同的问题发布为Outlook开发人员论坛中的新主题也是如此。
http://social.msdn.microsoft.com/Forums/en-US/ outlookdev / threads

While you are running that code in Access, it is really more of an Outlook-specific issue IMO, so I would suggest you also post this same question as a new topic in the Outlook developers forum as well. http://social.msdn.microsoft.com/Forums/en-US/outlookdev/threads

 


这篇关于Access / Office 2010自动化问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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