Selection.MoveDown Unit:=wdScreen, Count:=1, Extend:=wdExtend Selection.MoveDown Unit:=wdLine, Count:=5, Extend:=wdExtend also using the keyboard to select pages doesn'tĪlways work when you have tables in the middle of it all as the cursor usually gets stuck in the table while doing the Shift + Down combination. ![]() It even splits tables that span the boundary pages.Īnd this is the code produced by David's method (which I knew would be fairly useless to me otherwise I would have recorded in the first place, I'm not a total idiot, but then again I'm not a coder either). The above code ensures there is a manual page break between any deleted pages that lacked either a manual page break or a Section break to separate them. Set RngLo = RngLo.GoTo(What:=wdGoToBookmark, Name:="\page") Set RngLo = RngLo.GoTo(What:=wdGoToPage, Name:=PgLo + 1) Set RngHi = RngHi.GoTo(What:=wdGoToBookmark, Name:="\page") Set RngHi = RngHi.GoTo(What:=wdGoToPage, Name:=PgHi + 1) ComputeStatistics(wdStatisticPages) - 1įor i = UBound(Split(PgRngs, ",")) To 0 Step -1 ![]() A slightly more sophisticated version follows:ĭim RngHi As Range, RngLo As Range, Rng As Range In many situations, code like I posted is all that is required. I'm also fully aware that it overstates the case.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |