在 Visual Basic 6.0 中使用 Microsoft (Office) 365 工具 [英] Using Microsoft (Office) 365 tools in Visual Basic 6.0

查看:34
本文介绍了在 Visual Basic 6.0 中使用 Microsoft (Office) 365 工具的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个用 Visual Basic 6.0 编写的应用程序,它支持将 listViews 导出到 Microsoft Excel 文档.如果用户安装了旧版本的 Microsoft Office,则一切正常.

现在我想为系统上只有 Microsoft/Office 365 的用户添加支持.在过去的几天里,我在谷歌上搜索到了抑郁症,因为我对 dll/ocx 文件或注册表知之甚少(或任何真正的东西).我什至不确定是否可以完成这样的事情,因为 VB6 真的很旧,如前所述

我也尝试过在注册表中搜索 Excel.Application,如 here 建议的那样,但我找不到对应的 ActiveX 文件的路径(如果我理解正确,这可能意味着它没有注册).

我能做什么?任何帮助将不胜感激.

解决方案

没关系,我自己找到了答案.问题是我在安装新的 365 软件包时安装了较旧的 Office 版本,并且出于某种奇怪的原因,365 版本的 .dll 文件未注册.当我删除那些旧版本时,所有工作的 .dll 文件都随它们一起消失了.

我对 365 安装进行了修复,现在它运行良好.

I'm developing an application written in Visual Basic 6.0 that supports exporting listViews to Microsoft Excel documents. Everything works perfectly fine if a user has an older version of Microsoft Office installed.

Now I want to add support for users who only have Microsoft/Office 365 on their systems. I've googled my way into depression in the past couple of days because I don't know much (or anything really) about dll/ocx files or registries. I'm not even sure if something like this can even be done because VB6 is really old, as noted here.

I've tried using this approach, but it didn't help me.

Right now, I'm getting a 429 runtime error

ActiveX Component can't create object

on line

Set objExcel = CreateObject("Excel.Application")

I only have Microsoft 365 trial version (no older ones) installed on the system and have these two things checked in my references:

I've also tried searching for Excel.Application in the registry, as suggested here, but I can't find the path to the corresponding ActiveX file (which probably means it is not registered if I understand this correctly).

What can I do? Any help would be greatly appreciated.

解决方案

Never mind, I found the answer myself. The problem was that I had older Office versions installed when I installed new 365 package and for some odd reason the .dll files for 365 version weren't registered. When I deleted those older versions all the working .dll files were gone with them.

I did a repair of the 365 installation and it's working perfectly now.

这篇关于在 Visual Basic 6.0 中使用 Microsoft (Office) 365 工具的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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