Opening an Excel file attachment located in a Lotus Notes Database through VBA

允我心安 提交于 2019-12-02 13:48:11

问题


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.

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

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

What is the proper way to do it?


回答1:


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.

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

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

How to use LotusScript classes with Visual Basic



来源:https://stackoverflow.com/questions/11612041/opening-an-excel-file-attachment-located-in-a-lotus-notes-database-through-vba

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!