傳回 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 支援與意見反應。