Item Property

Microsoft Office Object Model

Show All

Item Property

       

Item property as it applies to the FileTypes collection.

Returns a value that indicates which file type will be searched for by the Execute method of the FileSearch object. Read-only MsoFileType.

MsoFileType can be one of these MsoFileType constants.
msoFileTypeAllFiles
msoFileTypeBinders
msoFileTypeCalendarItem
msoFileTypeContactItem
msoFileTypeDatabases
msoFileTypeDataConnectionFiles
msoFileTypeDesignerFiles
msoFileTypeDocumentImagingFiles
msoFileTypeExcelWorkbooks
msoFileTypeJournalItem
msoFileTypeMailItem
msoFileTypeNoteItem
msoFileTypeOfficeFiles
msoFileTypeOutlookItems
msoFileTypePhotoDrawFiles
msoFileTypePowerPointPresentations
msoFileTypeProjectFiles
msoFileTypePublisherFiles
msoFileTypeTaskItem
msoFileTypeTemplates
msoFileTypeVisioFiles
msoFileTypeWebPages
msoFileTypeWordDocuments

expression.Item(Index)

expression   Required. An expression that returns a FileTypes collection.

Index  Required Long. The index number of the object to be returned.

Item property as it applies to the CommandBars object.

Returns a CommandBar object from the CommandBars collection.

expression.Item(Index)

expression   Required. An expression that returns a CommandBars object.

Index  Required Variant. The name or index number of the object to be returned.

Item property as it applies to the CommandBarControls object.

Returns a CommandBarControl object from the CommandBarControls collection.

expression.Item(Index)

expression   Required. An expression that returns a CommandBarControls object.

Index  Required Variant. The name or index number of the object to be returned.

Item property as it applies to the DocumentProperties object.

Returns a DocumentProperty object from the DocumentProperties collection.

expression.Item(Index)

expression   Required. An expression that returns a DocumentProperties object.

Index  Required Variant. The name or index number of the document property returned.

Item property as it applies to the BalloonCheckboxes and BalloonLabels objects.

Returns a BalloonCheckBox or BalloonLabel object.

expression.Item(Index)

expression   Required. An expression that returns one of the above objects.

Index  Required Long. The index number of the check box or label to be returned.

Item property as it applies to the MsoEnvelope object.

Returns a MailItem object that can be used to send the document as an e-mail.

expression.Item

expression   Required. An expression that returns an MsoEnvelope object.

Item property as it applies to the PropertyTests object.

Returns a PropertyTest object from the PropertyTests collection.

expression.Item(Index)

expression   Required. An expression that returns a PropertyTests object.

Index  Required Long. The index number of the property test to be returned.

Item property as it applies to the ScopeFolders and SearchFolders objects.

Returns a ScopeFolder object that represents a subfolder of the parent object.

expression.Item(Index)

expression   Required. An expression that returns one of the above objects.

Index  Required Long. Determines which subfolder to return.

Item property as it applies to the SearchScopes object.

Returns a SearchScope object that corresponds to an area in which to perform a file search, such as local drives or Microsoft Outlook folders.

expression.Item(Index)

expression   Required. An expression that returns a SearchScopes object.

Index  Required Long. Determines which SearchScope object to return.

Item property as it applies to the SignatureSet object.

Returns a Signature object that corresponds to one of the digital signatures with which the document is currently signed.

expression.Item(iSig)

expression   Required. An expression that returns a SignatureSet object.

iSig  Required Long. Determines which Signature object to return.

Item property as it applies to the AnswerWizardFiles and FoundFiles objects.

Returns a file name string from an AnswerWizardFiles collection, or a file name from the list of file names represented by the FoundFiles object, respectively. Read-only String.

expression.Item(Index)

expression   Required. An expression that returns one of the above objects.

Index  Required Long. The index number of the Answer Wizard file name string, or the file name, to be returned.

Item property as it applies to the Assistant, BalloonCheckbox, BalloonLabel, and FileDialog objects.

Returns the text associated with an object. Read-only String.

expression.Item

expression   Required. An expression that returns one of the above objects.

Item property as it applies to the WebPageFonts object.

Returns a WebPageFont object from the WebPageFonts collection for a particular value of MsoCharacterSet.

expression.Item(Index)

expression   Required. An expression that returns one of the above objects.

Index  Required MsoCharacterSet. The specified character set.

MsoCharacterSet can be one of these MsoCharacterSet constants.
msoCharacterSetArabic
msoCharacterSetCyrillic
msoCharacterSetEnglishWesternEuropeanOtherLatinScript
msoCharacterSetGreek
msoCharacterSetHebrew
msoCharacterSetJapanese
msoCharacterSetKorean
msoCharacterSetMultilingualUnicode
msoCharacterSetSimplifiedChinese
msoCharacterSetThai
msoCharacterSetTraditionalChinese
msoCharacterSetVietnamese

Example

As it applies to the CommandBars object.

Item is the default member of the object or collection. The following two statements both assign a CommandBar object to cmdBar.

Set cmdBar = CommandBars.Item("Standard")
Set cmdBar = CommandBars("Standard")

As it applies to the BalloonCheckboxes and BalloonLabels objects.

Item is the default member of the object or collection. The following two statements both assign to lblText the text of the first label in the Balloon object assigned to myBalloon.

lblText = myBalloon.Labels(1).Item
lblText = myBalloon.Labels(1)

As it applies to the AnswerWizardFiles and FoundFiles objects.

This example resets the file list for the current Answer Wizard and displays both the file count and the file names in a message box, using the Item property to return the file names.

Dim customAnswerWizard As AnswerWizard
Dim strFileList As String
Dim intCounter As Integer
Dim intNumFiles As Integer
Set customAnswerWizard = Application.AnswerWizard
intCounter = 1

customAnswerWizard.ResetFileList
strFileList = ""
intNumFiles = customAnswerWizard.Files.Count
For intCounter = 1 To (intNumFiles)
    strFileList = strFileList & _
    customAnswerWizard.Files.Item(intCounter) & Chr(13)
Next

MsgBox "There are " & customAnswerWizard.Files.Count & _
    " files avaialble through this AnswerWizard: " & _
    Chr(13) & strFileList

As it applies to the WebPageFonts object.

The following example uses the Item property to set myFont to the WebPageFont object for the English/Western European/Other Latin Script character set in the active application.

Dim myFont As WebPageFont
Set myFont = _
 Application.DefaultWebOptions.Fonts. _
 Item(msoCharacterSetEnglishWesternEuropeanOtherLatinScript)

As it applies to the MsoEnvelope object.

The following example sends the active Microsoft Word document as an e-mail to the e-mail address that you pass to the subroutine.

Sub SendMail(ByVal strRecipient As String)

    'Use a With...End With block to reference the msoEnvelope object.
    With Application.ActiveDocument.MailEnvelope

        'Add some introductory text before the body of the e-mail message.
        .Introduction = "Please read this and send me your comments."

        'Return a MailItem object that you can use to send the document.
        With .Item

            'All of the mail item settings are saved with the document.
            'When you add a recipient to the Recipients collection
            'or change other properties these settings will persist.

            .Recipients.Add strRecipient
            .Subject = "Here is the document."

            'The body of this message will be
            'the content of the active document.
            .Send
        End With
    End With
End Sub