View Single Post
 
Old 01-03-2025, 03:07 PM
stusic stusic is offline Windows 10 Office 2021
Novice
 
Join Date: Jan 2025
Posts: 4
stusic is on a distinguished road
Question VBA to Copy Text Between Heading Styles to New File

Hello All!


I've got a lengthy document and I need to create individual documents for each of the headings I have to a new file.


It's laid out like this:
Code:
FirstTitleInHeading3Style

FirstTopicTextInNormalStyle 



SecondTitleInHeading3Style

SecondTopicTextInNormalStyle
From the following example, one file (FirstTitleInHeading3Style.doc) would be:


Code:
FirstTitleInHeading3Style

FirstTopicTextInNormalStyle
And the next file (SecondTitleInHeading3Style.doc) would be:


Code:
SecondTitleInHeading3Style

SecondTopicTextInNormalStyle
I know there's a way to separate it by isolating the text between the styles (Header 3), but I'm not sure how to go about it.


Any help would be greatly appreciated.


Thanks!


-stu

Last edited by stusic; 01-03-2025 at 03:09 PM. Reason: typo
Reply With Quote