Indexes.Add Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns a Index object that represents a new index added to a document.
public Microsoft.Office.Interop.Word.Index Add (Microsoft.Office.Interop.Word.Range Range, ref object HeadingSeparator, ref object RightAlignPageNumbers, ref object Type, ref object NumberOfColumns, ref object AccentedLetters, ref object SortBy, ref object IndexLanguage);
abstract member Add : Microsoft.Office.Interop.Word.Range * obj * obj * obj * obj * obj * obj * obj -> Microsoft.Office.Interop.Word.Index
Public Function Add (Range As Range, Optional ByRef HeadingSeparator As Object, Optional ByRef RightAlignPageNumbers As Object, Optional ByRef Type As Object, Optional ByRef NumberOfColumns As Object, Optional ByRef AccentedLetters As Object, Optional ByRef SortBy As Object, Optional ByRef IndexLanguage As Object) As Index
Parameters
- Range
- Range
Required Range object. The range where you want the index to appear. The index replaces the range, if the range isn't collapsed.
- HeadingSeparator
- Object
Optional Object.The text between alphabetic groups (entries that start with the same letter) in the index. Can be one of the following WdHeadingSeparator constants: wdHeadingSeparatorBlankLine, wdHeadingSeparatorLetter, wdHeadingSeparatorLetterFull, wdHeadingSeparatorLetterLow, or wdHeadingSeparatorNone.
- RightAlignPageNumbers
- Object
Optional Object. True to align page numbers with the right margin.
- Type
- Object
Optional Object. Specifies whether subentries are on the same line (run-in) as the main entry or on a separate line (indented) from the main entry. Can be either of the following WdIndexType constants: wdIndexIndent or wdIndexRunin.
- NumberOfColumns
- Object
Optional Object. The number of columns for each page of the index. Specifying 0 (zero) sets the number of columns in the index to the same number as in the document.
- AccentedLetters
- Object
Optional Object. True to include separate headings for accented letters in the index (for example, words that begin with "À" and words that begin with "A" are listed under separate headings).
- SortBy
- Object
Optional Object. The sorting criteria to be used for the specified index. Can be either of the following WdIndexSortBy constants: wdIndexSortByStroke or wdIndexSortBySyllable.
- IndexLanguage
- Object
Optional Object. The sorting language to be used for the specified index. Can be any of the WdLanguageID constants.
Returns
Remarks
An index is built from Index Entry (XE) fields in a document. Use the MarkEntry(Range, Object, Object, Object, Object, Object, Object, Object, Object) method to mark index entries to be included in an index.
Applies to
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기