編輯

共用方式為


InlineShapes Interface

Definition

A collection of InlineShape objects that represent all the inline shapes in a document, range, or selection.

public interface class InlineShapes : System::Collections::IEnumerable
[System.Runtime.InteropServices.Guid("000209A9-0000-0000-C000-000000000046")]
public interface InlineShapes : System.Collections.IEnumerable
type InlineShapes = interface
    interface IEnumerable
Public Interface InlineShapes
Implements IEnumerable
Attributes
Implements

Remarks

Use the InlineShapes property of a _Document, Range, or Selection object to return an InlineShapes collection.

Use the New(Range) method to create a new picture as an inline shape. You can use the AddPicture(String, Object, Object, Object) and AddOLEObject(Object, Object, Object, Object, Object, Object, Object, Object) methods to add pictures or OLE objects and link them to a source file. Use the AddOLEControl(Object, Object) method to add an ActiveX control.

Shape objects are anchored to a range of text but are free-floating and can be positioned anywhere on the page. You can use the ConvertToInlineShape() method and the ConvertToShape() method to convert shapes from one type to the other. You can convert only pictures, OLE objects, and ActiveX controls to inline shapes.

The Count property for this collection in a document returns the number of items in the main story only. To count items in other stories use the collection with the Range object.

When you open a document created in an earlier version of Microsoft Word, pictures are converted to inline shapes.

Properties

Application

Returns a Application object that represents the Microsoft Word application.

Count

Returns the number of items in the specified collection.

Creator

Returns a 32-bit integer that indicates the application in which the specified object was created.

Item[Int32]

Returns an individual object in a collection.

Parent

Returns an object that represents the parent object of the specified object.

Methods

AddChart(XlChartType, Object)

This object, member, or enumeration is deprecated and is not intended to be used in your code.

AddChart2(Int32, XlChartType, Object, Object)

Adds a chart to the document. Returns an InlineShape object that represents the chart and adds it to the specified collection.

AddHorizontalLine(String, Object)

Adds a horizontal line based on an image file to the current document.

AddHorizontalLineStandard(Object)

Adds a horizontal line to the current document.

AddOLEControl(Object, Object)

Creates an ActiveX control (formerly known as an OLE control).

AddOLEObject(Object, Object, Object, Object, Object, Object, Object, Object)

Creates an OLE object.

AddPicture(String, Object, Object, Object)

Adds a picture to a document.

AddPictureBullet(String, Object)

Adds a picture bullet based on an image file to the current document.

AddSmartArt(SmartArtLayout, Object)

Inserts a SmartArt graphic as an inline shape into the active document.

AddWebVideo(String, Object, Object, Object, Object, Object)

Adds a new web video to the document.

GetEnumerator()
New(Range)

Inserts an empty, 1-inch-square Microsoft Word picture object surrounded by a border.

Applies to