如何在word文档里添加excel附件?
Sub Macro1() Application.ScreenUpdating = False r = Range("A65536").End(xlUp).Row For i = r To 1 Step -1 If Cells(i, 1) = " 年 月 日" Then Rows(i + 1 & ":" & i + 5).Select Selection.Delete Shift:=xlUp ActiveWindow.SelectedSheets.HPageBreaks.Add Before:=ActiveCell End If Next i End Sub 按执行即可,因你的数据有几千行,所以运行比较慢,我测试了一下,需要40秒,这个时间动不了,你别急. 我的配置很高.如果配置不好,估计时间更长.
转载请注明出处51数据库 » excel以附件 word文档