將word中自動編碼的部分轉(zhuǎn)化為純數(shù)字格式
Sub ConvertAutoNumToTxt()
ActiveDocument.Content.ListFormat.ConvertNumbersToText
End Sub
還可以更復(fù)雜一些速妖,根據(jù)是否選擇了文本來部分或全部處理
Sub ConvertAutoNumToTxt()
If Selection.Type = wdSelectionIP Then
ActiveDocument.Content.ListFormat.ConvertNumbersToText
ActiveDocument.Content.Find.Execute FindText:="^t", replacewith:=" ", Replace:=wdReplaceAll
Else
Selection.Range.ListFormat.ConvertNumbersToText
Selection.Find.Execute FindText:="^t", replacewith:=" ", Replace:=wdReplaceAll
End If
End Sub
或者干脆都不要
Sub myRemoveAutoNumbers()
'去除所有的自動編號
'
ActiveDocument.Content.ListFormat.RemoveNumbers NumberType:=wdNumberParagraph
End Sub