Microsoft Word Suite
297
Command: mark entry for table of contents
Inserts a TC (Table of Contents Entry) field after the specified range. The TC field is returned as a
field object.
Syntax
mark entry for table of contents document Required. An expression that returns a document
object.
range text range Required text range object. The location of the entry. The TC field is inserted
after range.
entry Unicode text Required. The text that appears in the table of contents. To indicate a
subentry, include the main entry text and the subentry text, separated by a colon (:) (for
example, Introduction: The Product).
[table id Unicode text] Optional. A oneletter identifier for the table of figures or table of
contents item (for example, i for an illustration).
[level integer] Optional. A level for the entry in the table of contents or table of figures.
Example
This example inserts a table of contents entry that references the selected text. The text typed in the
input box appears in the table of contents. A table of contents that uses fields is then added at the
beginning of the active document.
set entryText to text returned of (display dialog "Type entry text" ¬
default answer "")
mark entry for table of contents active document range text object ¬
of selection entry entryText
set myRange to create range active document start 0 end 0
make new table of contents at active document with properties ¬
{text object:myRange, use fields:true, use heading styles:false}
Command: mark entry for table of figures
Inserts a TC (Table of Contents Entry) field after the specified range. The TC field is returned as a
field object.
Syntax
mark entry for table of figures document Required. An expression that returns a document
object.
range text range Required text range object. The location of the entry. The TC field is inserted
after range.
entry Unicode text Required. The text that appears in the table of figures. To indicate a subentry,
include the main entry text and the subentry text, separated by a colon (:) (for example,
Introduction: The Product).