When the content in Kingsoft phonetic is exported as a text file, the phonetic symbol is replaced by a specific symbol. You must change it to the font Kingsoft phonetic that is attached to Kingsoft phonetic. However, if there are many new words, It is very laborious to modify them one by one.
Example of the exported file:
+ Petty
/Adj. Small, unimportant, small, small, subtle, small, mean
& 5 PETI
+ Phase
/N. Stage, state, phase, phase
/V. Phase
& Feiz
Therefore, I used Word VBA to write a macro and used it to automatically change the font.
The Code is as follows:
Sub macro2 ()
'
'Macro2 macro
'Macro in? L1t recording
'
??? Selection. Find. clearformatting 'find the row whose first character is "&"
??? With selection. Find
??????? . Text = "&"
??????? . Replacement. Text = ""
??????? . Forward = true
??????? . Wrap = wdfindcontinue
??????? . Format = false
??????? . Matchcase = false
??????? . Matchwholeword = false
??????? . Matchbyte = true
??????? . Matchwildcards = false
??????? . Matchsoundslike = false
??????? . Matchallwordforms = false
??? End
??
??? Selection. Find. Execute
??? If selection. characters. First. Text "&" then
??????? Exit sub 'can be optimized in the future. Otherwise, the entire article will be checked, and it will be too wasteful to execute the search.
??? End if
???? Selection. Delete unit: = wdcharacter, Count: = 1 'delete "&" characters
??? Char = selection. moveenduntil (cset: = vbcr, Count: = 100 )'
??? Selection. Font. Name = "Kingsoft phonetic plain" 'set the font
???
End sub
Sub AAA ()
??? For I = 1 to 400 queries 400 times, 400 words at a time tired
??????? Macro2
??? Next I
End sub
Result After change
+ Petty
/Adj. Small, unimportant, small, small, subtle, small, mean
5 PETI
+ Phase
/N. Stage, state, phase, phase
/V. Phase
Feiz
?