r - 使用 R 提取 Outlook 联系人
问题描述
我正在尝试使用 R 编程语言查询 Outlook 联系人并将它们全部提取到 csv 文件中。我有一个示例代码:
#####################################################
library(RDCOMClient)
## init com api
OutApp <- COMCreate("Outlook.Application")
olFolderContacts <- 10
# get the namespace
ns <- OutApp$GetNamespace("MAPI")
# get the contact folder
folderContacts = ns$GetDefaultFolder(olFolderContacts)
# get the contact list
folderItems = folderContacts$Items()
i = 0
# get the first contact
itemObj = folderItems$Item(i+1)
#####################################################
# That's here that it fails
#####################################################
ContactName <- itemObj$GetElement()$Name()
#####################################################
这个想法是该文件夹包含不同类型的项目。如何查询 Object COM 接口以获取对象类型或 Class 以及如何调用与之相关的方法?
谢谢,
毛里齐奥。
解决方案
推荐阅读
- python - 具有大量短文本和少量长文本的潜在狄利克雷分配 (LDA)
- python-3.x - 如何解决 Raspberry Pi 3B 和 Bme280 远程 I/O 错误
- vb.net - 最大化表格但不覆盖任务栏
- python - 如何添加一个功能来监控使用 selenium 的链接点击?
- c++ - 使用向量的向量的 N 维矩阵类
- java - 如何在 Java 中安全地使用不可变类中的集合?
- flutter - 颤振 StreamBuilder 和 AnimatedWidget
- flutter - Flutter:在过滤 json 数据时获取“状态”实例
- javascript - 获取popup的路径url,保存在当前vue组件的变量中
- powershell - Powershell在添加注册表时以任何方式隐藏是和否弹出窗口