Skip to main content

Phonetic object

Table of contents
  1. Remarks
  2. Example

Contains information about a specific phonetic text string in a cell.

Remarks

In Microsoft Excel 97, this object contained the formatting attributes for any phonetic text in the specified range.

Example

Use Phonetics (index), where index is the index number of the phonetic text, to return a single Phonetic object.

The following example sets the first phonetic text string in the active cell to "フリガナ".

ActiveCell.Phonetics(1).Text = "フリガナ"

The Phonetic property of the Range object provides compatibility with earlier versions of Microsoft Excel. You should use Phonetics (index), where index is the index number of the phonetic text, to return a single Phonetic object. To demonstrate compatibility with earlier versions of Microsoft Excel, the following example adds Furigana characters to the range A1:C4. If you add Furigana characters to a range, a new Phonetic object is automatically created.

With Range("A1:C4").Phonetic 
    .CharacterType = xlHiragana 
    .Alignment = xlPhoneticAlignCenter 
    .Font.Name = "MS P ゴシック" 
    .Font.FontStyle = "標準" 
    .Font.Size = 6 
    .Font.Strikethrough = False 
    .Font.Underline = xlUnderlineStyleNone 
    .Font.ColorIndex = xlAutomatic 
    .Visible = True 
End With

Leave a comment

Your email address will not be published. Required fields are marked *

Format your code: <pre><code class="language-vba">place your code here</code></pre>