Replace Word Macro in the Chinese Double Quotes

xiaoxiao2021-03-06  14

Use this macro to make a shortcut on the menu, just replace a pair of Western double quotes at a time.

Sub Replace Chinese Double Quotes ()

Selection.find.clearformatting

With selection.find

.Text = "" "" "

.Replacement.text = chrw (8220) & chrw (8221)

.Forward = TRUE

.Wrap = wdfindcontinue

.Format = false

.Matchcase = false

.Matchwholeword = false

.Matchbyte = TRUE

.MatchWildcards = false

.Matchsoundslike = false

.Matchallwordforms = false

End with

Selection.find.execute

Selection.Typetext text: = chrw (8220)

Selection.find.clearformatting

With selection.find

.Text = "" "" "

.Replacement.text = chrw (8220) & chrw (8221)

.Forward = TRUE

.Wrap = wdfindcontinue

.Format = false

.Matchcase = false

.Matchwholeword = false

.Matchbyte = TRUE

.MatchWildcards = false

.Matchsoundslike = false

.Matchallwordforms = false

End with

Selection.find.execute

Selection.Typetext text: = chrw (8221)

End Sub

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

New Post(0)