Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 05-29-2022, 08:02 AM
Prascena Prascena is offline Delete second page from all the word docs in a folder Windows 10 Delete second page from all the word docs in a folder Office 2010
Novice
Delete second page from all the word docs in a folder
 
Join Date: May 2022
Posts: 2
Prascena is on a distinguished road
Default Delete second page from all the word docs in a folder

Hello,



I have 400 word documents (.docx) in a folder. In all the 400 documents, second sheet is blank. I want to delete the second sheet from all of them. Is there any macro to do this?

Thank you.
Reply With Quote
  #2  
Old 05-29-2022, 03:24 PM
macropod's Avatar
macropod macropod is offline Delete second page from all the word docs in a folder Windows 10 Delete second page from all the word docs in a folder Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

The code for that really depends on what is causing the second page to be blank - which you haven't told us about. It could be caused by any one or more of:
• manual page breaks;
• section breaks;
• paragraph 'page break before' formatting; and/or
• empty paragraphs on the second page.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 05-30-2022, 05:28 PM
Prascena Prascena is offline Delete second page from all the word docs in a folder Windows 10 Delete second page from all the word docs in a folder Office 2010
Novice
Delete second page from all the word docs in a folder
 
Join Date: May 2022
Posts: 2
Prascena is on a distinguished road
Default

Hello, thank you for your reply.

I checked and it is a section break.

Can you help with this? Thank you.
Reply With Quote
  #4  
Old 05-31-2022, 07:36 AM
macropod's Avatar
macropod macropod is offline Delete second page from all the word docs in a folder Windows 10 Delete second page from all the word docs in a folder Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

There would need to be more than just a single Section break. Moreover, indiscriminately deleting Section breaks can seriously mess up a document's layout.

Without actually seeing the problem document, it can be difficult for anyone to craft an effective solution for the issue. Can you attach a document to a post with some representative data (delete anything sensitive)? You do this via the paperclip symbol on the 'Go Advanced' tab at the bottom of this screen.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply

Tags
macro, word vba



Similar Threads
Thread Thread Starter Forum Replies Last Post
Delete last page of .docx and then save as .pdf for all the files in a folder kalton Word VBA 2 01-23-2020 10:05 PM
Delete second page from all the word docs in a folder Save all docs to pdf in specified folder loki005 Word VBA 4 10-25-2018 02:18 PM
Delete second page from all the word docs in a folder Import a specific range (bookmarked section) from all Word docs in a selected folder Greengecko Word VBA 5 06-14-2016 07:54 AM
Delete second page from all the word docs in a folder Sequential Page Numbering of Multiple Word Docs bobmard Word 8 08-24-2011 08:51 AM
Weird problem - word docs are producing temp files that won't self delete David92595 Word 0 07-07-2011 04:07 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 09:52 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft