Home > Software engineering > How to put the text frame's increasing number automatically? Some font change big red? Written
How to put the text frame's increasing number automatically? Some font change big red? Written
Time:09-16
Such as: how to put the text frame's increasing number automatically? Some font change big red? Written in VBA code execution or
The code is as follows: how to modify the code?
CodePudding user response:
Without your documents, don't know how to adjust the font, can only help you here.
Option Explicit
Sub automatic numbering () Application. ScreenUpdating=False Dim shpTemp As Shape, intStart As Long IntStart=InputBox (" please enter the number of initial count, the default is "1000000001" : ", "input value", "1000000001") For Each shpTemp In ThisDocument. Shapes ShpTemp. TextFrame. TextRange. Paragraphs (2). The Range="stub: NO" & amp; IntStart IntStart=intStart + 1 Next Application. ScreenUpdating=True End Sub
CodePudding user response:
Change, increase the Font color and Size, you can manually modify the Font Size, Font, Size) :
Option Explicit
Sub automatic numbering () Application. ScreenUpdating=False Dim shpTemp As Shape, intStart As Long IntStart=InputBox (" please enter the number of initial count, the default is "1000000001" : ", "input value", "1000000001") For Each shpTemp In ThisDocument. Shapes With shpTemp. TextFrame. TextRange. Paragraphs (2). The Range . The Text="stub: NO" & amp; IntStart The Bold=True , the Font Color=wdColorRed , the Font Size=15 End With IntStart=intStart + 1 Next Application. ScreenUpdating=True End Sub