|
楼主,一是建议你以后处理PDF格式文件,最好选用世界第一的俄罗斯软件 ABBYY Fine Reader中文绿色版(301MB);二是试用如下VBA代码(我是菜鸟水平有限不足之处请谅解,如果文字太多,费时可能会很长,请耐心等待直到出现OK对话框为止):
Sub 中英文分离()
Dim i As Paragraph, n As Long
For Each i In ActiveDocument.Paragraphs
For n = 1 To i.Range.Characters.Count
If Asc(i.Range.Characters(1).Text) < 0 Then
If Asc(i.Range.Characters(n).Text) > 0 Then i.Range.Characters(n).InsertBefore Text:=vbTab: Exit For
ElseIf Asc(i.Range.Characters(1).Text) > 0 Then
If Asc(i.Range.Characters(n).Text) < 0 Then i.Range.Characters(n).InsertBefore Text:=vbTab: Exit For
End If
Next n
Next
'
Selection.WholeStory
Selection.ConvertToTable Separator:=wdSeparateByTabs, NumColumns:=2, AutoFitBehavior:=wdAutoFitFixed
With Selection.Tables(1)
If .Style <> "网格型" Then
.Style = "网格型"
End If
.ApplyStyleHeadingRows = True
.ApplyStyleLastRow = True
.ApplyStyleFirstColumn = True
.ApplyStyleLastColumn = True
End With
MsgBox "OK!"
End Sub |
|