title: OnBase - Find Keyword with VBScript
body: <p>I've been struggling with trying to find a Keyword in OnBase with VBScript.  I'm not sure of the method to find and get the value based on the Keyword</p>
  
  <p>This is what I have so far</p>
  
  <pre><code>'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
  </code></pre>