Excel VBA如何去掉WORD中的全部自动编号的格式,但数字还保留着
展开全部
备份文件后应用如下宏(用法:如果有选择则处理选择区域,否则处理全部):
Sub 自动编号转文本()
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 自动编号转文本()
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
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询