Current location - Education and Training Encyclopedia - Graduation thesis - Urgent! ! ! Word article punctuation cannot be converted from half-width to full-width.
Urgent! ! ! Word article punctuation cannot be converted from half-width to full-width.
References:

1, find/replace all punctuation marks;

You can't find all the punctuation marks in Word at once, so you need to change half-angle punctuation marks into full-angle punctuation marks one by one. English punctuation is a *** 17, which can be done at most 17 times.

Chinese punctuation range (not all):

"。" "," ";" ":" "?" "!" "...""-"~ ""["]" """""""""""""""""" 17.

English punctuation range (not all), corresponding to Chinese punctuation:

".""," ";" ":" "?" "!" "…" "-" " ~ " "(" ")" " & lt;" >"'" "'" """" """"

The last four are equivalent to'' ""

2. Turn a half angle into a full angle;

Convert all documents to full width, Ctrl+A selects all documents, and then select < change case >, select, that is, convert the selected half-width characters to full width.

It takes 26*2=52 times for A-Z and A-Z to become half angles again.

=====================================

The above two methods are more complicated. If you need a one-time conversion, you can use the macro tools in Word to achieve it. Send me a message if necessary. I have collected tools.

The conversion tool code is as follows, which can be automatically added to Word:

* +++++++++++++++++++++++++++++

* created by I love you _Word! @ExcelHome 2005-5-20 5:30:30

Only tested in the system: Windows NT Word: 10.0 Language: 2052.

^The code is copied in [thisdocument-thisdocument]'

'* -

sub replace English interfunction in Chinese()

Replace English punctuation marks in Chinese paragraphs with Chinese punctuation marks in Chinese-English documents

Dim i as a paragraph, Chinese interference () as a variant, and English interference () as a variant.

Dim MyRange is the range, and n is the byte.

Defines a Chinese punctuation array object.

ChineseInterpunction = Array(" ., ",", "; ", ":", "? ", "! ", "……", "—", "~", "〔", "〕", "《", "》", "'", "'", """, """)

Defines an array object of English punctuation.

EnglishInterpunction = Array(" . ", ",", ";" , ":", "?" , "!" 、“…”、“-”、“~”、“(“,”)、“& lt," >, "'", "'", """", """")

Continue to the next step when an error occurs.

Turn off screen updates.

For each i in this document. Paragraph traverses each paragraph of the document.

If ASC (i.range) < If the first character of a paragraph is a Chinese character (ASC

Define a range object.

For N = 0 to 13' 14 cycles.

"Set MyRange = i.Range" defines a Range object.

And my Lan Zhi. Find'

. Clear Format clears the lookup format.

Find the corresponding English punctuation and replace it with the corresponding Chinese punctuation.

. Execute findtext: = English interfunction (n), replace with: = Chinese interfunction (n), Replace:=wdReplaceAll.

End with ...

then

If ... it will be over.

then

choose HomeKey wdStory

Have a choice. find

. Clear Format clears the lookup format.

. Text = """Find"

If the search is successful and it is in a Chinese paragraph, replace it with "/"respectively.

And ... carry out

If Asc (select. Paragraph (1). Range)<0 and then select. Text = """

If. Execute and Asc (select. Paragraph (1). Range)<0 and then select. Text = """

line

End with ...

choose HomeKey wdStory

Have a choice. find

. Clear Format clears the lookup format.

. Text = """'Find'

And ... carry out

If the search is successful and it is in a Chinese paragraph, replace it with "/"respectively.

If Asc (select. Paragraph (1). Range)<0 and then select. Text = """

If. Execute and Asc (select. Paragraph (1). Range)<0 and then select. Text = """

line

End with ...

Continue screen update

Apply. ScreenUpdating = True

End joint

-

Sub ReplaceInStoryChinese()

Replace English punctuation marks in Chinese paragraphs with Chinese punctuation marks.

Dim i as a paragraph, Chinese interference () as a variant, and English interference () as a variant.

Represents n as bytes.

Defines a Chinese punctuation array object.

ChineseInterpunction = Array(" ., ",", "; ", ":", "? ", "! ", "……", "—", "~", "〔", "〕", "《", "》", "'", "'", """, """)

Defines an array object of English punctuation.

EnglishInterpunction = Array(" . ", ",", ";" , ":", "?" , "!" 、“…”、“-”、“~”、“(“,”)、“& lt," >, "'", "'", """", """")

Continue to the next step when an error occurs.

Turn off screen updates.

With this document. Content. seek

For N = 0 to 13' 14 cycles.

. Clear Format clears the lookup format.

Find the corresponding English punctuation and replace it with the corresponding Chinese punctuation.

. Execute findtext: = English interfunction (n), replace with: = Chinese interfunction (n), Replace:=wdReplaceAll.

then

End with ...

choose "HomeKey wdStory" moves to the beginning of the document.

Have a choice. find

. Clear Format clears the lookup format.

. Text = """Find"

If the search is successful and it is in a Chinese paragraph, replace it with "/"respectively.

And ... Execute: select. Text = """

. Execute: select. Text = """

line

End with ...

choose HomeKey wdStory

Have a choice. find

. Clear Format clears the lookup format.

. Text = """'Find'

If the search is successful and it is in a Chinese paragraph, replace it with "/"respectively.

And ... Execute: select. Text = """

. Execute: select. Text = """

line

End with ...

Continue screen update

Apply. ScreenUpdating = True

End joint

-

sub replace chineseinterfunctioninenglish()

Replace all Chinese punctuation with English punctuation.

Dimchineinterference () as a variable, englishinterference () as a variable, n as a byte.

Defines a Chinese punctuation array object.

ChineseInterpunction = Array(" ., ",", "; ", ":", "? ", "! ", "……", "—", "~", "〔", "〕", "《", "》", "'", "'", """, """)

Defines an array object of English punctuation.

EnglishInterpunction = Array(" . ", ",", ";" , ":", "?" , "!" 、“…”、“-”、“~”、“(“,”)、“& lt," >, "'", "'", """", """")

Continue to the next step when an error occurs.

MsgBox UBound (English English)

Turn off screen updates.

With this document. Content. seek

For 14 cycles with N = 0 to 16'.

. Clear Format clears the lookup format.

Find the corresponding English punctuation and replace it with the corresponding Chinese punctuation.

. Execute findtext: = Chinese interfunction (n), replace with: = English interfunction (n), Replace:=wdReplaceAll.

then

End with ...

Continue screen update

Apply. ScreenUpdating = True

End joint

-