Navigation: Scripting Reference Manual > Functions & Subroutines > KeywordGetDescription

 

KeywordGetDescription

 

Contact Us: fredsupport@photonengr.com

 

Description

Returns the description string for a designated keyword node.

 

 

Syntax

kwDesc = KeywordGetDescription( kwNode )

 

 

Parameters

kwDesc (String)

Returned description string for the keyword node being queried.

 

kwNode As Long

Node number of the keyword being queried.

 

 

Example

The example below demonstrates how to loop over the keywords in a document and delete any keywords whose description matches a search string.

 

Sub Main

 

    ClearOutputWindow()

 

    'This is the description we want to search for

    Dim searchDesc As String

    searchDesc = "Created by script"

 

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

    'over them, retrieve the description and delete any keywords

    'with a description matching our search string.

    'Loop in reverse order to make sure we delete from the end of

    'the node list, otherwise the deletion operation can result in

    'an array bounds error.

    Dim kwNum As Long, curKw As Long

    Dim kwDesc As String

    kwNum = KeywordCount()

    For curKw = kwNum-1 To 0 Step -1

        kwDesc = KeywordGetDescription( curKw )

        If kwDesc = searchDesc Then

            KeywordDelete( curKw )

        End If

    Next

 

End Sub

 

See Also

Keyword Scripting Commands

 

 

 

 

 

Copyright © Photon Engineering, LLC