Add Method (Phonetics Collection) Example

This example adds three phonetic text strings to the active cell. The example then sets the character type to Hiragana, sets the font color to blue, and sets the text to visible.

ActiveCell.FormulaR1C1 = "toukyoutotoukyoutotoukyoutoshibuyakushibuyakushibuyakuyoyogiyoyogiyoyogi"
ActiveCell.Phonetics.Add Start:=1, Length:=3, Text:="toukyouto toukyoutotoukyouto toukyoutotoukyouto toukyouto"
ActiveCell.Phonetics.Add Start:=4, Length:=3, Text:="shibuyaku shibuyakushibuyaku shibuyaku"
ActiveCell.Phonetics.Add Start:=7, Length:=3, Text:="yoyogiyoyogiyoyogi"
ActiveCell.Phonetics.CharacterType = xlHiragana
ActiveCell.Phonetics.Font.Color = vbBlue
ActiveCell.Phonetics.Visible = True