【问题标题】:OnBase - Find Keyword with VBScriptOnBase - 使用 VBScript 查找关键字
【发布时间】:2014-05-23 12:41:51
【问题描述】:

我一直在努力尝试使用 VBScript 在 OnBase 中找到关键字。我不确定根据关键字查找和获取值的方法

这是我目前所拥有的

'Keywords to Get
Const KEYWORD_VENDORNO = "Vendor Number"

Sub Main
   'Create Application Object
    Dim objApplication
    Set objApplication = CreateObject("OnBase.Application")

    'Get the current document
    Dim objCurrentDocument
    Set objCurrentDocument = objApplication.CurrentDocument

    'Get Collection of Keywords
    Dim colKeywords
    Set colKeywords = objCurrentDocument.Keywords

    'Set Keyword in memory
    colKeywords.AddKeyword(KEYWORD_VENDORNO,"123")
    'Save Keyword
    objCurrentDocument.StoreKeywords


    'Get Keyword - This is the part I don't know how to get.  I can't seem to find the 'right property or method to get the value of the keyword
'I've tried all the following, but none seem to work.  The only one that doesn't give me an 'error is the 2nd one, but it also doesn't give me a value
     msgbox colKeywords(0)
     msgbox colKeywords(KEYWORD_VENDORNO)
     msgbox colKeywords.GetKeyword(KEYWORD_VENDORNO)
     msgbox colKeywords.FindKeyword(KEYWORD_VENDORNO)
     msgbox objCurrentDocument.GetKeyword(KEYWORD_VENDORNO)
     msgbox objCurrentDocument.FindKeyword(KEYWORD_VENDORNO)
End Sub

【问题讨论】:

    标签: collections vbscript keyword-search


    【解决方案1】:

    您搜索过OnBase Community 寻求帮助吗?那里有很多很棒的资源。

    我快速搜索了“VB 关键字”,发现this post 询问有关 VB 脚本中的文档句柄。答案是:

    尝试从“documentHandle = document.Handle”之前删除“set”。

    this post 支持此功能,其中包含不带 SET 前缀的示例。

    尝试删除 SET 前缀。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-10-30
      • 1970-01-01
      • 1970-01-01
      • 2010-12-20
      • 2013-11-01
      • 1970-01-01
      相关资源
      最近更新 更多