vba 运行时错误 429,ActiveX 组件无法创建对象,自动化 MS Word 应用程序,CreateObject("Word.Application")
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/17557604/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Run-time error 429, ActiveX component can't create object, automate MS Word application, CreateObject("Word.Application")
提问by Chloe
I'm running into the following error when executing the following line from VBA (Access):
从 VBA (Access) 执行以下行时遇到以下错误:
Set wd = CreateObject("Word.Application")
I found the following link, but did not find it useful: http://support.microsoft.com/kb/828550
我找到了以下链接,但没有发现它有用:http: //support.microsoft.com/kb/828550
Things I've Tried
我尝试过的事情
- Repair installation of Office from Control Panel > Programs and Features
- Uninstall MS Word, re-install
- Tried
Dim wd As Object
instead ofDim wd as Word.Application
- Manually run Word.
- Run
winword.exe /RegServer
in Administrator command prompt. Did not run silently, merely opened Word. - Examine the LocalServer32 key under the CLSID {000209FF-0000-0000-C000-000000000046}. Initially was missing. After re-install Word, the CLDID was there but LocalServer32 key is missing.
- Run
winword.exe /automation
. Merely starts Word. - Run
winword.exe
as Administrator. - Run
access.exe
as Administrator.
- 从控制面板 > 程序和功能修复 Office 安装
- 卸载 MS Word,重新安装
- 尝试
Dim wd As Object
代替Dim wd as Word.Application
- 手动运行 Word。
winword.exe /RegServer
在管理员命令提示符下运行。并没有默默运行,只是打开了Word。- 检查 CLSID {000209FF-0000-0000-C000-000000000046} 下的 LocalServer32 键。最初是失踪。重新安装 Word 后,CLDID 存在,但 LocalServer32 密钥丢失。
- 运行
winword.exe /automation
。只需启动 Word。 winword.exe
以管理员身份运行。access.exe
以管理员身份运行。
Relevant (maybe)
相关(可能)
- Windows 8 x64
- Office 2007
- C:\Program Files (x86)\Microsoft Office\Office12
- A preview version of Office 2010 was pre-installed.
- Launching Excel works with automation and VBA.
- asycfilt.dll file version: 6.2.9200.16384, date: 7/25/2012 11:05pm
- oleaut32.dll file version: 6.2.9200.16384, date: 7/25/2012 11:06pm
- olepro32.dll missing
- stdole2.tlb no file version, date: 7/25/2012 10:34pm
- McAffee anti-virus
- 视窗 8 x64
- 办公室 2007
- C:\Program Files (x86)\Microsoft Office\Office12
- 预装了 Office 2010 的预览版。
- 使用自动化和 VBA 启动 Excel。
- asycfilt.dll 文件版本:6.2.9200.16384,日期:7/25/2012 11:05pm
- oleaut32.dll 文件版本:6.2.9200.16384,日期:7/25/2012 11:06pm
- olepro32.dll 丢失
- stdole2.tlb 无文件版本,日期:7/25/2012 10:34pm
- 迈克菲杀毒软件
回答by AndASM
Examine the LocalServer32 key under the CLSID {000209FF-0000-0000-C000-000000000046}. Initially was missing. After re-install Word, the CLDID was there but LocalServer32 key is missing
检查 CLSID {000209FF-0000-0000-C000-000000000046} 下的 LocalServer32 键。最初是失踪。重新安装 Word 后,CLDID 存在,但 LocalServer32 密钥丢失
So Word is unable to register properly because you have a system issue.
As that you've tried most or all of the reasonable steps, your next step is to reinstall Windows.
因此 Word 无法正确注册,因为您有系统问题。
由于您已尝试了大部分或所有合理的步骤,因此下一步是重新安装 Windows。
Or you could try manually registering it by duplicating all the relevant keys from a different machine. But that probably wouldn't solve the problem.
或者您可以尝试通过从另一台机器复制所有相关密钥来手动注册它。但这可能解决不了问题。
Super Usermight be a better place to ask about installation and Windows registry issues.
超级用户可能是询问安装和 Windows 注册表问题的更好地方。