Syntax

expression.Add(Start, Length, Text)

expression A variable that represents a Phonetics object.

Parameters

Name Required/Optional Data Type Description
Start Required Long The position that represents the first character in the specified cell.
Length Required Long The number of characters from the Start position to the end of the text in the cell.
Text Required String Collectively, the characters that represent the phonetic text in the cell.

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.

Visual Basic for Applications
ActiveCell.FormulaR1C1 = " toukyouto toukyouto toukyouto shibuyaku shibuyaku shibuyaku yoyogi yoyogi yoyogi" ActiveCell.Phonetics.Add Start:=1, Length:=3, Text:=" toukyouto  toukyouto toukyouto  toukyouto toukyouto  toukyouto" ActiveCell.Phonetics.Add Start:=4, Length:=3, Text:=" shibuyaku  shibuyaku shibuyaku  shibuyaku" ActiveCell.Phonetics.CharacterType = xlHiragana ActiveCell.Phonetics.Font.Color = vbBlue ActiveCell.Phonetics.Visible = True

See also: