ThisComponent Object
Addresses the active component whose properties can be read and set, and whose methods can be called. ThisComponent is used in Basic, where it represents the current document. Properties and methods available through ThisComponent depend on the document type.
ThisComponent
Sub Main
REM āĻĻā§āĻŦāĻžāĻ°āĻž āĻĒāĻžāĻ ā§āĻ¯ āĻ¨āĻĨāĻŋāĻ¤ā§ "āĻ¸ā§āĻāĻŋāĻĒāĻ¤ā§āĻ°" āĻšāĻžāĻ˛āĻ¨āĻžāĻāĻžāĻĻ āĻāĻ°āĻž āĻšā§
Dim allindexes, index As Object
allindexes = ThisComponent.getDocumentIndexes()
index = allindexes.getByName("Table of Contents1")
REM āĻ āĻ¸ā§āĻāĻŋāĻĒāĻ¤ā§āĻ° āĻāĻŦāĻ a 1 āĻāĻ° āĻāĻ¨ā§āĻ¯ āĻĒā§āĻ°ā§āĻŦāĻ¨āĻŋāĻ°ā§āĻ§āĻžāĻ°āĻŋāĻ¤ āĻ¨āĻžāĻŽ āĻŦā§āĻ¯āĻŦāĻšā§āĻ¤ āĻšā§
index.update()
End Sub