Item Method
This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.
Item method as it applies to the Borders object.
Returns a border in a range or selection.
expression.Item(Index)
expression Required. An expression that returns a Borders object.
WdBorderType
WdBorderType can be one of these WdBorderType constants. |
wdBorderBottom |
wdBorderDiagonalDown |
wdBorderDiagonalUp |
wdBorderHorizontal |
wdBorderLeft |
wdBorderRight |
wdBorderTop |
wdBorderVertical |
Item method as it applies to the Dialogs object.
Returns a dialog in Microsoft Word.
expression.Item(Index)
expression Required. An expression that returns a Dialogs object.
WdWordDialog
WdWordDialog can be one of these WdWordDialog constants. |
wdDialogMailMergeInsertSet |
wdDialogConnect |
wdDialogConsistencyChecker |
wdDialogControlRun |
wdDialogConvertObject |
wdDialogCopyFile |
wdDialogCreateAutoText |
wdDialogDocumentStatistics |
wdDialogDrawAlign |
wdDialogDrawSnapToGrid |
wdDialogEditAutoText |
wdDialogEditCreatePublisher |
wdDialogEditFind |
wdDialogEditFrame |
wdDialogEditGoTo |
wdDialogEditGoToOld |
wdDialogEditLinks |
wdDialogEditObject |
wdDialogEditPasteSpecial |
wdDialogEditPublishOptions |
wdDialogEditReplace |
wdDialogEditStyle |
wdDialogEditSubscribeOptions |
wdDialogEditSubscribeTo |
wdDialogEditTOACategory |
wdDialogEmailOptions |
wdDialogFileDocumentLayout |
wdDialogFileFind |
wdDialogFileMacCustomPageSetupGX |
wdDialogFileMacPageSetup |
wdDialogFileMacPageSetupGX |
wdDialogFileNew |
wdDialogFileOpen |
wdDialogFilePageSetup |
wdDialogFilePrint |
wdDialogFilePrintOneCopy |
wdDialogFilePrintSetup |
wdDialogFileRoutingSlip |
wdDialogFileSaveAs |
wdDialogFileSaveVersion |
wdDialogFileSummaryInfo |
wdDialogFileVersions |
wdDialogFitText |
wdDialogFontSubstitution |
wdDialogFormatAddrFonts |
wdDialogFormatBordersAndShading |
wdDialogFormatBulletsAndNumbering |
wdDialogFormatCallout |
wdDialogFormatChangeCase |
wdDialogFormatColumns |
wdDialogFormatDefineStyleBorders |
wdDialogFormatDefineStyleFont |
wdDialogFormatDefineStyleFrame |
wdDialogFormatDefineStyleLang |
wdDialogFormatDefineStylePara |
wdDialogFormatDefineStyleTabs |
wdDialogFormatDrawingObject |
wdDialogFormatDropCap |
wdDialogFormatEncloseCharacters |
wdDialogFormatFont |
wdDialogFormatFrame |
wdDialogFormatPageNumber |
wdDialogFormatParagraph |
wdDialogFormatPicture |
wdDialogFormatRetAddrFonts |
wdDialogFormatSectionLayout |
wdDialogFormatStyle |
wdDialogFormatStyleGallery |
wdDialogFormatStylesCustom |
wdDialogFormatTabs |
wdDialogFormatTheme |
wdDialogFormFieldHelp |
wdDialogFormFieldOptions |
wdDialogFrameSetProperties |
wdDialogHelpAbout |
wdDialogHelpWordPerfectHelp |
wdDialogHelpWordPerfectHelpOptions |
wdDialogHorizontalInVertical |
wdDialogIMESetDefault |
wdDialogInsertAddCaption |
wdDialogInsertAutoCaption |
wdDialogInsertBookmark |
wdDialogInsertBreak |
wdDialogInsertCaption |
wdDialogInsertCaptionNumbering |
wdDialogInsertCrossReference |
wdDialogInsertDatabase |
wdDialogInsertDateTime |
wdDialogInsertField |
wdDialogInsertFile |
wdDialogInsertFootnote |
wdDialogInsertFormField |
wdDialogInsertHyperlink |
wdDialogInsertIndex |
wdDialogInsertIndexAndTables |
wdDialogInsertMergeField |
wdDialogInsertNumber |
wdDialogInsertObject |
wdDialogInsertPageNumbers |
wdDialogInsertPicture |
wdDialogInsertSubdocument |
wdDialogInsertSymbol |
wdDialogInsertTableOfAuthorities |
wdDialogInsertTableOfContents |
wdDialogInsertTableOfFigures |
wdDialogLetterWizard |
wdDialogListCommands |
wdDialogMailMerge |
wdDialogMailMergeCheck |
wdDialogMailMergeCreateDataSource |
wdDialogMailMergeCreateHeaderSource |
wdDialogMailMergeFieldMapping |
wdDialogMailMergeFindRecord |
wdDialogMailMergeHelper |
wdDialogMailMergeInsertAddressBlock |
wdDialogMailMergeInsertAsk |
wdDialogMailMergeInsertFields |
wdDialogMailMergeInsertFillIn |
wdDialogMailMergeInsertGreetingLine |
wdDialogMailMergeInsertIf |
wdDialogMailMergeInsertNextIf |
wdDialogMailMergeInsertSkipIf |
wdDialogMailMergeOpenDataSource |
wdDialogMailMergeOpenHeaderSource |
wdDialogMailMergeQueryOptions |
wdDialogMailMergeRecipients |
wdDialogMailMergeUseAddressBook |
wdDialogMarkCitation |
wdDialogMarkIndexEntry |
wdDialogMarkTableOfContentsEntry |
wdDialogNewToolbar |
wdDialogNoteOptions |
wdDialogOrganizer |
wdDialogPhoneticGuide |
wdDialogReviewAfmtRevisions |
wdDialogSearch |
wdDialogTableAutoFormat |
wdDialogTableCellOptions |
wdDialogTableColumnWidth |
wdDialogTableDeleteCells |
wdDialogTableFormatCell |
wdDialogTableFormula |
wdDialogTableInsertCells |
wdDialogTableInsertRow |
wdDialogTableInsertTable |
wdDialogTableOfCaptionsOptions |
wdDialogTableOfContentsOptions |
wdDialogTableProperties |
wdDialogTableRowHeight |
wdDialogTableSort |
wdDialogTableSplitCells |
wdDialogTableTableOptions |
wdDialogTableToText |
wdDialogTableWrapping |
wdDialogTCSCTranslator |
wdDialogTextToTable |
wdDialogToolsAcceptRejectChanges |
wdDialogToolsAdvancedSettings |
wdDialogToolsAutoCorrect |
wdDialogToolsAutoCorrectExceptions |
wdDialogToolsAutoManager |
wdDialogToolsAutoSummarize |
wdDialogToolsBulletsNumbers |
wdDialogToolsCompareDocuments |
wdDialogToolsCreateDirectory |
wdDialogToolsCreateEnvelope |
wdDialogToolsCreateLabels |
wdDialogToolsCustomize |
wdDialogToolsCustomizeKeyboard |
wdDialogToolsCustomizeMenuBar |
wdDialogToolsCustomizeMenus |
wdDialogToolsDictionary |
wdDialogToolsEnvelopesAndLabels |
wdDialogToolsHangulHanjaConversion |
wdDialogToolsHighlightChanges |
wdDialogToolsHyphenation |
wdDialogToolsLanguage |
wdDialogToolsMacro |
wdDialogToolsMacroRecord |
wdDialogToolsManageFields |
wdDialogToolsMergeDocuments |
wdDialogToolsOptions |
wdDialogToolsOptionsAutoFormat |
wdDialogToolsOptionsAutoFormatAsYouType |
wdDialogToolsOptionsBidi |
wdDialogToolsOptionsCompatibility |
wdDialogToolsOptionsEdit |
wdDialogToolsOptionsFileLocations |
wdDialogToolsOptionsFuzzy |
wdDialogToolsOptionsGeneral |
wdDialogToolsOptionsPrint |
wdDialogToolsOptionsSave |
wdDialogToolsOptionsSpellingAndGrammar |
wdDialogToolsOptionsTrackChanges |
wdDialogToolsOptionsTypography |
wdDialogToolsOptionsUserInfo |
wdDialogToolsOptionsView |
wdDialogToolsProtectDocument |
wdDialogToolsProtectSection |
wdDialogToolsRevisions |
wdDialogToolsSpellingAndGrammar |
wdDialogToolsTemplates |
wdDialogToolsThesaurus |
wdDialogToolsUnprotectDocument |
wdDialogToolsWordCount |
wdDialogTwoLinesInOne |
wdDialogUpdateTOC |
wdDialogViewZoom |
wdDialogWebOptions |
wdDialogWindowActivate |
Item method as it applies to the HeadersFooters object.
Returns a header or footer in a range or selection.
expression.Item(Index)
expression Required. An expression that returns a HeadersFooters object.
WdHeaderFooterIndex
WdHeaderFooterIndex can be one of these WdHeaderFooterIndex constants. |
wdHeaderFooterEvenPages |
wdHeaderFooterFirstPage |
wdHeaderFooterPrimary |
Item method as it applies to the ListGalleries object.
Returns the type of list (bulleted, numbered or outline) from the list template gallery.
expression.Item(Index)
expression Required. An expression that returns a ListGalleries object.
WdListGalleryType
WdListGalleryType can be one of these WdListGalleryType constants. |
wdBulletGallery |
wdNumberGallery |
wdOutlineNumberGallery |
Item method as it applies to the MappedDataFields object.
Returns a specified mapped data field.
expression.Item(Index)
expression Required. An expression that returns a MappedDataFields object.
WdMappedDataFields
WdMappedDataFields can be one of these WdMappedDataFields constants. |
wdAddress1 |
wdAddress2 |
wdBusinessFax |
wdBusinessPhone |
wdCity |
wdCompany |
wdCountryRegion |
wdCoutesyTitle |
wdEmailAddress |
wdFirstName |
wdHomeFax |
wdHomePhone |
wdJobTitle |
wdLastName |
wdMiddleName |
wdNickname |
wdPostalCode |
wdSpouseCourtesyTitle |
wdSpouseFirstName |
wdSpouseLastName |
wdSpouseMiddleName |
wdSpouseNickname |
wdState |
wdSuffix |
wdUniqueIdentifier |
wdWebPageURL |
Item method as it applies to the StoryRanges object.
Returns a single story of a range or selection as a Range object.
expression.Item(Index)
expression Required. An expression that returns a StoryRanges object.
WdStoryType
WdStoryType can be one of these WdStoryType constants. |
wdCommentsStory |
wdEndnotesStory |
wdEvenPagesFooterStory |
wdEvenPagesHeaderStory |
wdFirstPageFooterStory |
wdFirstPageHeaderStory |
wdFootnotesStory |
wdMainTextStory |
wdPrimaryFooterStory |
wdPrimaryHeaderStory |
wdTextFrameStory |
Item method as it applies to the TaskPanes object.
Returns the specified task pane as a TaskPane object.
expression.Item(Index)
expression Required. An expression that returns a **TaskPanes**object.
WdTaskPanes
WdTaskPanes can be one of these WdTaskPanes constants. |
wdTaskPaneFormatting |
wdTaskPaneInspector |
wdTaskPaneMailMerge |
wdTaskPaneSearch |
wdTaskPaneTranslate |
Item method as it applies to the Zooms object.
Returns the specified Zoom object.
expression.Item(Index)
expression Required. An expression that returns a Zooms object.
WdViewType
WdViewType can be one of these WdViewType constants. |
wdMasterView |
wdNormalView |
wdOutlineView |
wdPrintPreview |
wdPrintView |
wdWebView |
Item method as it applies to all other objects in the Applies To list.
Returns an individual object in a collection.
expression.Item(Index)
expression Required. An expression that returns one of the objects in the above list.
Index Required Variant or Long. The individual object to be returned.
objects
AddIns |
AutoCaptions |
AutoCorrectEntries |
AutoTextEntries |
Bookmarks |
CanvasShapes |
CaptionLabels |
CustomLabels |
CustomProperties |
DiagramNodeChildren |
DiagramNodes |
Dictionaries |
Documents |
EmailSignatureEntries |
FileConverters |
FirstLetterExceptions |
FormFields |
GroupShapes |
HangulAndAlphabetExceptions |
HangulHanjaConversionDictionaries |
Hyperlinks |
Languages |
ListEntries |
ListTemplates |
MailMergeDataFields |
MailMergeFieldNames |
OtherCorrectionsExceptions |
ReadabilityStatistics |
Reviewers |
ShapeRange |
Shapes |
ShapeNodes |
SmartTags |
Styles |
StyleSheets |
TablesOfAuthoritiesCategories |
TabStops |
Tasks |
Templates |
TwoInitialCapsExceptions |
Variables |
Windows |
objects
Adjustments |
Cells |
Characters |
Columns |
Comments |
Endnotes |
Fields |
FontNames |
Footnotes |
Frames |
HeadingStyles |
HTMLDivisions |
Indexes |
InlineShapes |
KeyBindings |
KeysBoundTo |
Lists |
ListLevels |
ListParagraphs |
MailMergeFields |
PageNumbers |
Panes |
Paragraphs |
ProofreadingErrors |
RecentFiles |
Revisions |
Rows |
Sections |
Sentences |
SpellingSuggestions |
Subdocuments |
Tables |
TablesOfAuthorities |
TablesOfContents |
TablesOfFigures |
TextColumns |
Versions |
Words |
Example
As it applies to the Bookmarks object.
This example selects the bookmark named "temp" in the active document.
Sub BookmarkItem()
If ActiveDocument.Bookmarks.Exists("temp") = True Then
ActiveDocument.Bookmarks.Item("temp").Select
End If
End Sub
As it applies to the Borders object.
This example inserts a double border above the first paragraph in the active document.
Sub BorderItem()
ActiveDocument.Paragraphs(1).Borders.Item(wdBorderTop) _
.LineStyle = wdLineStyleDouble
End Sub
As it applies to the Dialogs object.
This example displays the Page Setup dialog.
Sub DialogItem()
Application.Dialogs.Item(wdDialogFileDocumentLayout).Display
End Sub
As it applies to the Documents object.
This example displays the name of the first document in the Documents collection.
Sub DocumentItem()
If Documents.Count >= 1 Then
MsgBox Documents.Item(1).Name
End If
End Sub
As it applies to the HeadersFooters object.
This example creates and formats a first page header in the active document.
Sub HeadFootItem()
ActiveDocument.PageSetup.DifferentFirstPageHeaderFooter = True
With ActiveDocument.Sections(1).Headers _
.Item(wdHeaderFooterFirstPage).Range
.InsertBefore "Sales Report"
With .Font
.Bold = True
.Size = "15"
.Color = wdColorBlue
End With
.Paragraphs.Alignment = wdAlignParagraphCenter
End With
End Sub
As it applies to the ListEntries object.
This example clears all the items from the drop-down form field named "Colors" and then adds two color names. The Item method is used to display the first color in the drop-down form field.
Sub ListEntryItem()
Dim d As DropDown
Set d = ActiveDocument.FormFields.Add _
(Range:=Selection.Range, _
Type:=wdFieldFormDropDown).DropDown
With d.ListEntries
.Add Name:="Black"
.Add Name:="Green"
End With
MsgBox d.ListEntries.Item(1).Name
End Sub