View Single Post
 
Old 11-20-2021, 12:08 AM
Noob_VBA Noob_VBA is offline Windows 10 Office 2016
Novice
 
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