【问题标题】:How to clear the value of a Rich text field in Lotus Notes如何清除 Lotus Notes 中富文本字段的值
【发布时间】:2015-02-13 10:11:43
【问题描述】:

我在 Lotus Notes 中有一个富文本字段。但我不确定如何清除该字段的内容。
我尝试了以下方法:

  1. ReplaceItemValue:
doc.ReplaceItemValue("RichTextField", "")

ReplaceItemValue 不适用于富文本字段。

  1. vRTItem.Values = "":

Set vRTItem = doc.GetFirstItem( "RichTextField" )
vRTItem.Values = ""

这没有帮助。

  1. RemoveItem:

Set vRTItem = doc.GetFirstItem( "RichTextField" )
Call doc.RemoveItem("RichTextField")
Set vRTItem = doc.CreateRichTextItem( "RichTextField" )

但它们都不起作用。

【问题讨论】:

    标签: lotus-notes lotusscript


    【解决方案1】:

    查看您编写的所有代码以及触发此代码的位置(文档事件、按钮、代理等)会很有帮助

    你有什么应该工作,但你需要在调用这些方法后保存文档:

    doc.Save(false, false)
    

    【讨论】:

      【解决方案2】:

      doc.GetFirstItem() 方法中的“First”暗示可能有多个。

      我会使用 doc.RemoveItem("theNameOfTheItem") :确保在之后保存文档,然后再对文档进行任何其他操作。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2012-10-01
        • 2019-02-03
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多