如何在Notes表单中显示文件系统中的图像?

时间:2021-09-13 00:22:04

I want to show an image from the filesystem in a Notes client form. I tried using the Picture object, but even the computed image will only allow pictures from the resources. Changing the resources seems to be impossible without expensive third party libraries. How do I solve that?

我想在Notes客户端表单中显示文件系统中的图像。我尝试使用Picture对象,但即使是计算图像也只允许来自资源的图片。没有昂贵的第三方库,改变资源似乎是不可能的。我该如何解决?

1 个解决方案

#1


4  

You can use «Pass-Thru HTML» feature. You can use <img> tag with your image as src attribute. So, just type <img src=", add Computed Text here and type " />. Select all typed text and make it «Pass-Thru HTML» («Text\Pass-Thru HTML» menu). You will see something like this:

您可以使用«Pass-Thru HTML»功能。您可以将如何在Notes表单中显示文件系统中的图像?标记与您的图像一起用作src属性。因此,只需输入如何在Notes表单中显示文件系统中的图像?即可。选择所有键入的文本并使其成为“Pass-Thru HTML”(«Text \ Pass-Thru HTML»菜单)。你会看到这样的东西:

如何在Notes表单中显示文件系统中的图像?

In Computed Text formula type the name of field which holds your image path and save the form:

在“计算文本”公式中,键入保存图像路径并保存表单的字段名称:

如何在Notes表单中显示文件系统中的图像?

Now, you can use this form:

现在,您可以使用此表单:

Dim ws As New NotesUIWorkspace
Dim ses As New NotesSession
Dim doc As NotesDocument

Set doc = ses.CurrentDatabase.CreateDocument
doc.Form = "FileSystemImage"
doc.ImageSource = "file:///C:/Images/Add.png"

ws.EditDocument , doc

Note that your image path must be formated in url format.

请注意,您的图像路径必须以url格式格式化。

#1


4  

You can use «Pass-Thru HTML» feature. You can use <img> tag with your image as src attribute. So, just type <img src=", add Computed Text here and type " />. Select all typed text and make it «Pass-Thru HTML» («Text\Pass-Thru HTML» menu). You will see something like this:

您可以使用«Pass-Thru HTML»功能。您可以将如何在Notes表单中显示文件系统中的图像?标记与您的图像一起用作src属性。因此,只需输入如何在Notes表单中显示文件系统中的图像?即可。选择所有键入的文本并使其成为“Pass-Thru HTML”(«Text \ Pass-Thru HTML»菜单)。你会看到这样的东西:

如何在Notes表单中显示文件系统中的图像?

In Computed Text formula type the name of field which holds your image path and save the form:

在“计算文本”公式中,键入保存图像路径并保存表单的字段名称:

如何在Notes表单中显示文件系统中的图像?

Now, you can use this form:

现在,您可以使用此表单:

Dim ws As New NotesUIWorkspace
Dim ses As New NotesSession
Dim doc As NotesDocument

Set doc = ses.CurrentDatabase.CreateDocument
doc.Form = "FileSystemImage"
doc.ImageSource = "file:///C:/Images/Add.png"

ws.EditDocument , doc

Note that your image path must be formated in url format.

请注意,您的图像路径必须以url格式格式化。