Phonetics.Length property (Excel)

Returns a Long value that represents the number of characters of phonetic text from the position you've specified with the Start property.

Syntax

expression.Length

expression A variable that represents a Phonetics object.

Example

This example returns the length of the second phonetic text string in the active cell.

ActiveCell.FormulaR1C1 = "東京都渋谷区代々木" 
ActiveCell.Phonetics.Add Start:=1, Length:=3, Text:="トウキョウト" 
ActiveCell.Phonetics.Add Start:=4, Length:=3, Text:="シブヤク" 
MsgBox ActiveCell.Phonetics(2).Length

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.