Print the contents of Jinshan word tyrants with Word

zhaozj2021-02-16  83

When the content of Jinshan Words is exported to text documents, the phonet is replaced with a specific symbol. You must change it into a font Kingsoft Phonetic, a font KingSoft Phonetic, which can be changed. However, if there is a lot of words, a modification is very laborious.

Exported file example:

PETTY / Adj. Small, not important, small, small, subtle, small, despicable & 5peti phase / n. stage, state, phase, phase / v. Pixiang & Fez therefore, I Writing a macro with Word's VBA, using it automatically completed changes in font.

code show as below:

Sub macro2 () '' macro2 macro 'macro is in 2004-06-26? L1T recording' ??? selection.find.clearformatting 'Find the first character is "&" row ??? with selection.find ?? ????? .text = "&" ??????? .replacement.text = "" ????????.foreward = true ??????? .wrap = WDFINDCONTINUE ??? ????. Format = false ???????.matchcase = false ???????.matchWholeWord = false ???????.matchbyte = true ???????.matchwildcards = False ???????.matchsoundslike = false ??????? .matchallwordforms = false ??? End with ????i selection.characters.First.Text <> "&" ??????? EXIT SUB 'This can be optimized in the future, otherwise the entire article is checked, still performing a look too waste ??? End if ???? Selection.delete Unit: = WDCHARACTER, Count: = 1 'Delete "&" Character ???????????????????????????? Selection.movenduntuntil (Cset: = VBCR, Count: = 100)' Select the rest of this line? Plain "'Setting the font ??? End subsis aaa () ??? for i = 1 to 400' Find 400 times, study 400 words is very tired ??????? macro2 ??? Next Iend Sub

After changing the result

PETTY

/ adj. small, not important, small size, small, subtle, small, despicable

5peti

PHASE

/ n. Stage, state, phase, phase

/ v. Pixabay

Feiz

?

转载请注明原文地址:https://www.9cbs.com/read-14226.html

New Post(0)