Deleting page ranges

S

Subligaria

How do you delete large page ranges in Publisher 2003?

In other words, in a 200-page document, I want to delete 100 pages. And I
don't want to have to do this in 50 lots of two pages.

Any help would be appreciated.
 
E

Ed Bennett

Subligaria said:
In other words, in a 200-page document, I want to delete 100 pages.
And I don't want to have to do this in 50 lots of two pages.

You could quite easily write a macro to do this.
 
S

Subligaria

You probably could; I couldn't.

Besides, it would take longer than deleting the pages manually.
 
E

Ed Bennett

Subligaria said:
You probably could; I couldn't.

Press Alt+F11
Double-click on Project, then Microsoft Office Publisher Objects
Copy and paste the following code:

Sub DeletePages()
'replace a and b with the starting and finishing page numbers
'a must be smaller than b for the code to work correctly
Dim i As Integer
For i = a To b
ThisDocoument.Pages(a).Delete
Next
End Sub

Replace a and b with the first and last page numbers of the range you want
to delete respectively.

Click somewhere inside the sub (e.g. on Integer) and press Play.

(N.B. This code is untested, and is not guaranteed to work. It is
recommended you create a backup of your work before running code on it.
This code comes in AS IS condition with no warrantees and confers no
rights.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top