|
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用 · 内置多项VBA编程加强工具 ★ 免费下载 ★ ★ 使用手册★
Sub limonet()
Dim Path$, FileName$
Path = ThisDocument.Path & "\"
FileName = Dir(Path & "*.docx")
Do While FileName <> ""
If FileName <> "汇总.docm" Then
Documents.Open (Path & FileName)
Selection.GoTo What:=wdGoToPage, Which:=wdGoToNext, Name:=ActiveDocument.Windows(1).Panes(1).Pages.Count
Selection.EndKey Unit:=wdStory, Extend:=wdExtend
Selection.Copy
ActiveDocument.Close False
Selection.InsertBreak Type:=0
Selection.PasteAndFormat (wdFormatOriginalFormatting)
End If
FileName = Dir
Loop
End Sub
|
评分
-
2
查看全部评分
-
|