共用方式為


Publisher) (TextRange.InlineShapes 屬性

會傳回 InlineShapes 集合,代表包含在文字範圍內的內嵌圖案。 唯讀。

語法

運算式InlineShapes

表達 代表 TextRange 物件的 變數。

傳回值

InlineShapes

註解

使用 TextFrame.Story.TextRange.InlineShapes 會傳回文字圖文框中的所有內嵌圖形,包括溢位中的內嵌圖形。

使用 TextFrame.TextRange.InlineShapes 只會傳回文字圖文框中可見的內嵌圖形,而不會傳回溢位中的內嵌圖形。

範例

下列範例會使用中出版物第一頁上找到的第一個圖案 (文字方塊)。 InlineShapes 屬性然後來判斷在文字方塊中是否存在任何內置圖案。 如果任何找到的每一個內嵌圖形已垂直翻轉和其前景色彩設定為紅色。

請注意,使用 TextFrame.Story.TextRange.InlineShapes ,也可找到溢位中的任何內嵌圖形。

Dim theShape As Shape 
Dim i As Integer 
 
Set theShape = ActiveDocument.Pages(1).Shapes(1) 
 
With theShape.TextFrame.Story.TextRange 
 If .InlineShapes.Count > 0 Then 
 For i = 1 To .InlineShapes.Count 
 .InlineShapes(i).Flip (msoFlipVertical) 
 .InlineShapes(i).Fill.ForeColor.RGB = vbRed 
 Next 
 End If 
End With

支援和意見反應

有關於 Office VBA 或這份文件的問題或意見反應嗎? 如需取得支援服務並提供意見反應的相關指導,請參閱 Office VBA 支援與意見反應