Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 11-20-2021, 12:08 AM
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 All,


I'm still can't figure it out.


I try this method but it doesn't printout the results to the word doc.


With .Find
.ClearFormatting
.Replacement.ClearFormatting
.Text = "Functional Hazard Analysis/System Safety Assessment Summary^p"
.Style = "Heading 1"
.Format = True
.Wrap = wdFindStop
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
.Execute
End With
If .Find.Found = True Then
Set Rng = .Duplicate
Set Rng = Rng.GoTo(What:=wdGoToBookmark, Name:="\HeadingLevel")
Rng.Start = Rng.Paragraphs.First.Range.End
Rng.End = Rng.Paragraphs.Last.Range.Start
End If
Reply With Quote
 



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 09:21 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