CodePudding user response:
Sub demo ()
Dim I As Object, the name As a String, the path As String
Path=ActiveDocument. Path & amp; ""
For Each I In ActiveDocument. Sections
The Select Case i.I ndex
Case 1
Name="04 illustrate the book. Doc"
Case 2
Name="03 the appended drawings. Doc"
Case 3
Name="01 patent claim. Doc"
Case 4
Name="02 instruction. Doc"
Case 5
Name="05 instruction attached figure. Doc"
In Case the Else
The Exit For
End the Select
I.R ange. Copy
The Documents. The Add
Selection. Paste
ActiveDocument. SaveAs FileName:=path & amp; The name, FileFormat:=0
ActiveDocument. Close True
Next I
End Sub