Navigation: Scripting Reference Manual > Functions & Subroutines > KeywordCount

 

KeywordCount

 

Contact Us: fredsupport@photonengr.com

 

Description

This function returns the number of keywords that exist in the document.

 

 

Syntax

kwNum = KeywordCount( )

 

 

Parameters

kwNum (Long)

Returned number of keywords that exist in the document.

 

 

Example

The example below demonstrates how to retrieve the number of keywords in the document and then loop over each keyword and print the name and description to the output window.

 

Sub Main

 

    'Clear output window and print header information

    ClearOutputWindow()

    Print "Keywords in document:"

    Print "Name" & Chr(9) & "Description"

 

    'Retrieve the number of keywords in the document, then loop

    'over them and print name and description to the output window

    Dim kwNum As Long, curKw As Long

    kwNum = KeywordCount()

    For curKw = 0 To kwNum-1

        Print KeywordGetName( curKw ) & Chr(9) & KeywordGetDescription( curKw )

    Next

 

End Sub

 

See Also

Keyword Scripting Commands

 

 

 

 

 

Copyright © Photon Engineering, LLC