Last Blank Page

G

Guest

I have a blank 2nd page in my one page document. I have enabled viewing the
formatting and all that is on that page is a single paragraph mark. I am
unable to select and delete that mark. The immediately preceeding item on
the page above is a Section Break (Next Page). I can delete that OK thus
removing the last page (the paragraph mark moves up to right after the final
text on the preceeding page), however, then the page border for that page
disappears and I have to recreate it. I am wondering if there is some way
around this as I have 60 separate documents to remove the final page from
(created them by breaking a master document into a bunch of subdocuments).
There were no blank pages in the master document.
 
D

Doug Robbins - Word MVP

If you put a copy of the files in a folder by themselves and then when you
run a macro containing the following code, you navigate to that folder, it
will change the next page section breaks to continuous section breaks.

Dim MyPath As String
Dim MyName As String
Dim MyDoc As Document

'let user select a path
With Dialogs(wdDialogCopyFile)
If .Display() <> -1 Then Exit Sub
MyPath = .Directory
End With

'strip quotation marks from path

If Len(MyPath) = 0 Then Exit Sub

If Asc(MyPath) = 34 Then
MyPath = Mid$(MyPath, 2, Len(MyPath) - 2)
End If

'get files from the selected path
'and change the section break to a continuous section break
MyName = Dir$(MyPath & "*.*")
Do While MyName <> ""
Set MyDoc = Documents.Open(MyPath & MyName)
MyDoc.Sections(2).PageSetup.SectionStart = wdSectionContinuous
MyDoc.Save
MyDoc.Close
MyName = Dir
Loop
Set MyDoc = Nothing

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 

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