全部显示

Length 属性

       

应用于 CalloutFormat 对象的 Length 属性。

应用于 Phonetics 对象的 Length 属性。

说明

本属性为只读属性。可用 CustomLength 方法为 CalloutFormat 对象设置本属性的值。

示例

如果标注“callout1”的第一条线段的长度固定为某一值,那么本示例将使第一张工作表上标注“callout2”的第一条线段的长度也固定为该值。为使本示例正常运行,两个标注必须都是由若干线段组成的。

Set myDocument = Worksheets(1)
With myDocument.Shapes
    With .Item("callout1").Callout
        If Not .AutoLength Then len1 = .Length
    End With
    If len1 Then .Item("callout2").Callout.CustomLength len1
End With

本示例返回活动单元格中第二个拼音文本串的长度。

ActiveCell.FormulaR1C1 = "toukyoutotoukyoutotoukyoutoshibuyakushibuyakushibuyakuyoyogiyoyogiyoyogi"
ActiveCell.Phonetics.Add Start:=1, Length:=3, Text:="toukyouto toukyoutotoukyouto toukyoutotoukyoutotoukyouto"
ActiveCell.Phonetics.Add Start:=4, Length:=3, Text:="shibuyaku shibuyakushibuyaku"
MsgBox ActiveCell.Phonetics(2).Length