通过VBA打开位于Lotus Notes数据库中的Excel文件附件 [英] Opening an Excel file attachment located in a Lotus Notes Database through VBA

查看:358
本文介绍了通过VBA打开位于Lotus Notes数据库中的Excel文件附件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在莲花笔记中自动打开位于作业数据库中的excel文件。我已经能够使用url在莲花笔记中打开一个窗口,但我无法自动打开位于那里的文件,因为它是一个附件。

I am trying to automate the opening of an excel file located in a jobs database within lotus notes. I have been able to open up a window in lotus notes using the url, but I can't open the file located there automatically as it is an attachment.

这是我用来打开链接的vba代码:

This is the vba code I am using to open the link:

Application.ActiveWorkbook.FollowHyperlink Address:="Notes://URL", NewWindow:=True

什么是正确的方法?

推荐答案

您将需要使用VBA通过COM访问Lotus Notes。然后,您可以获取NotesEmbeddedObject,使用ExtractFile方法保存它,然后启动保存的副本。

You'll need to use VBA to access Lotus Notes via COM. Then you can get at the NotesEmbeddedObject, save it using the ExtractFile method, and then launch that saved copy.

使用Notes COM API的VBA示例: http://www.vbafin.com/Lotus-Notes-VBA-code.php

An example of VBA using Notes COM API: http://www.vbafin.com/Lotus-Notes-VBA-code.php

IBM网站上有一个文档可以帮助您开始使用:

There's a document on IBM's site that will help you get started:

如何在Visual Basic中使用LotusScript

这篇关于通过VBA打开位于Lotus Notes数据库中的Excel文件附件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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