Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 11-23-2021, 10:22 PM
gmayor's Avatar
gmayor gmayor is offline Copy Between Two Headings/Texts Windows 10 Copy Between Two Headings/Texts Office 2019
Expert
 
Join Date: Aug 2014
Posts: 4,144
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default


If the documents have manual page breaks like your example, the temporary conversion to section breaks is performed by the macro and takes only a fraction of a second. Where do you want the filename to be placed?
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
  #2  
Old 11-24-2021, 03:38 PM
Noob_VBA Noob_VBA is offline Copy Between Two Headings/Texts Windows 10 Copy Between Two Headings/Texts Office 2016
Novice
Copy Between Two Headings/Texts
 
Join Date: Nov 2021
Posts: 9
Noob_VBA is on a distinguished road
Default

Hello Graham,


Can I add this code to the existing macro for the section break?
word.Selection.HomeKey
word.Selection.InsertBreak Type:=wdPageSectionBreak

word.Selection.MoveDown
The filename will be output first, then the copied data between the two headings under the filename. Maybe adding a page break before repeating for the next word doc.

Thank you,

New to Marco VBA
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Need to copy texts from excel and paste in to the Notepad++ in between the particular tags ganesang Word VBA 2 08-27-2018 02:05 AM
Copy Between Two Headings/Texts Applied Styles to Headings in Multi-Level List; now ALL second level headings are 1.XX NNL Word 1 08-09-2017 02:52 PM
Numbered headings not working as expected after customising headings seanspotatobusiness Word 5 03-03-2017 04:44 AM
Copy, Paste, and Format Multiple Headings Dretherix Word VBA 2 02-12-2016 08:26 AM
Trying to find and copy all headings at the same time WaltR Word 7 08-21-2012 03:12 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 08:05 PM.


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