Document.InlineShapes Property (2007 System)

Gets an InlineShapes collection that represents all the InlineShape objects in the document.

Namespace:  Microsoft.Office.Tools.Word
Assembly:  Microsoft.Office.Tools.Word.v9.0 (in Microsoft.Office.Tools.Word.v9.0.dll)

Syntax

'Declaration
<BrowsableAttribute(False)> _
Public ReadOnly Property InlineShapes As InlineShapes
'Usage
Dim instance As Document 
Dim value As InlineShapes 

value = instance.InlineShapes
[BrowsableAttribute(false)]
public InlineShapes InlineShapes { get; }
[BrowsableAttribute(false)]
public:
property InlineShapes^ InlineShapes {
    InlineShapes^ get ();
}
public function get InlineShapes () : InlineShapes

Property Value

Type: InlineShapes
An InlineShapes collection that represents all the InlineShape objects in the document.

Examples

The following code example adds an inline shape (a horizontal line) to the document and then shows a message box displaying the number of inline shapes.

This example is for a document-level customization.

Private Sub DocumentInlineShapes()
    Dim myRange As Object = Me.Paragraphs(1).Range
    Me.InlineShapes.AddHorizontalLineStandard(myRange)
    MessageBox.Show("Total inline shapes: " & Me.InlineShapes.Count.ToString())
End Sub
private void DocumentInlineShapes()
{
    object myRange = this.Paragraphs[1].Range;
    this.InlineShapes.AddHorizontalLineStandard(ref myRange);
    MessageBox.Show("Total inline shapes: " +
        this.InlineShapes.Count.ToString());
}

.NET Framework Security

See Also

Reference

Document Class

Document Members

Microsoft.Office.Tools.Word Namespace