Lotusscript:我可以检测富文本字段中的图片吗?

Lotusscript : Can I detect picture in rich text field?

我的程序有问题,因为我的用户喜欢将截屏图片附加到富文本字段中

例如

而我的程序无法检测到它们...

大家可以分享一下你的想法吗?...

谢谢。

考虑为您的富文本字段使用 NotesRichTextNavigator。通过

获取导航器
Set notesRichTextNavigator  =  notesRichTextItem .CreateNavigator 

然后对于 notesRichTextNavigator 对象,使用 FindFirstElementFindNextElement 调用来检查特定元素类型的富文本字段内容。

检查导航器 class API 参考:https://www.ibm.com/support/knowledgecenter/en/SSVRGU_9.0.1/basic/H_NOTESRICHTEXTNAVIGATOR_CLASS.html


更新

我已经用 Notes Designer 检查了一些东西,我不得不说以下内容。

上述导航器方法不适合检查粘贴到富文本字段的图片。标准注释功能不允许检查富文本项目是否包含嵌入的图片对象。

notesDocument.HasEmbeddedrichtextItem.EmbeddedObjects 均未显示包含嵌入的图片。

但根据 API 规范,描述的方式可以控制文件附件、ole 对象和文档链接。

请注意,如果您正在使用未保存的 notesDocument,即 new document,您应该调用 notesUIDocument.Refresh(true) 从前端传递富文本项 UI 文档到后端notesDocument。否则 getFirstItem(richTextFieldName) 将 return Nothing.