楼主: 路小雨
942 2

[问答] 神人来帮帮忙,关于VBA的问题。 [推广有奖]

  • 0关注
  • 0粉丝

硕士生

15%

还不是VIP/贵宾

-

威望
0
论坛币
319 个
通用积分
0
学术水平
0 点
热心指数
0 点
信用等级
0 点
经验
1970 点
帖子
80
精华
0
在线时间
153 小时
注册时间
2011-6-15
最后登录
2020-4-11

20论坛币
我有一个file,这个file 270页,老板要求每30页就要割成一份然后save,但是我只懂割成将270页成一页一页然后save,不知道有什么办法,
以下是割成一页页的方法,如何modify?

另外为什么会每次个了后会多一页白的,如何消除它?
Sub BreakOnPage()   ' Used to set criteria for moving through the document by page.   Application.Browser.Target = wdBrowsePage   For i = 1 To ActiveDocument.BuiltInDocumentProperties("Number of Pages")            'Select and copy the text to the clipboard.      ActiveDocument.Bookmarks("\page").Range.Copy      ' Open new document to paste the content of the clipboard into.      Documents.Add      Selection.Paste' Removes the break that is copied at the end of the page, if any.      Selection.TypeBackspace      ChangeFileOpenDirectory "C:\"      DocNum = DocNum + 1      ActiveDocument.SaveAs FileName:="test_" & DocNum & ".doc"      ActiveDocument.Close      ' Move the selection to the next page in the document.      Application.Browser.Next   Next i   ActiveDocument.Close savechanges:=wdDoNotSaveChangesEnd Sub   

关键词:VBA Application Properties Selection clipboard criteria document through moving modify
沙发
williamshang 发表于 2013-11-24 21:32:46 |只看作者 |坛友微信交流群
好像没什么好说的,希望今天过去比昨天充实吧

使用道具

藤椅
路小雨 发表于 2013-12-19 07:27:24 |只看作者 |坛友微信交流群
顶!!!!!!!!!!!!!11

使用道具

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注cda
拉您进交流群

京ICP备16021002-2号 京B2-20170662号 京公网安备 11010802022788号 论坛法律顾问:王进律师 知识产权保护声明   免责及隐私声明

GMT+8, 2024-5-3 19:09