Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3940956
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T00:28:57+00:00 2026-05-20T00:28:57+00:00

I want to choose sentences in a Word document which start with a bold

  • 0

I want to choose sentences in a Word document which start with a bold character.

How can I do it?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T00:28:58+00:00Added an answer on May 20, 2026 at 12:28 am

    How about:

    Dim s As Range
    For Each s In ActiveDocument.Sentences
        If s.Characters(1).Bold = True Then
            Debug.Print s
        End If
    Next
    

    I do not quite see what you mean by ‘choose’, you can use s.Select, but it will only work for one sentence.

    EDIT re comments

    Very roughly:

    Dim s As Range
    Dim doc1 As Document
    Dim doc2 As Document
    
    Set doc1 = Word.Documents("Doc1.doc")
    Set doc2 = Word.Documents("Doc2.doc")
    
    For Each s In doc1.Sentences
        If s.Characters(1).Bold = True Then
            Debug.Print s
            doc2.Select
                Selection.Find.ClearFormatting
                With Selection.Find
                    ''.Text cannot be set to more than 256 characters
                    .Text = s
                    .Replacement.Text = ""
                    .Forward = True
                    .Wrap = wdFindContinue
                    .Format = False
                    .MatchCase = False
                    .MatchWholeWord = False
                    .MatchWildcards = False
                    .MatchSoundsLike = False
                    .MatchAllWordForms = False
                End With
                a = Selection.Find.Execute
                If a = True Then
                    Selection.Characters(1).Font.Bold = True
                    ''Or for the whole sentence
                    Selection.Font.Bold = True
                End If
            doc1.Select
        End If
    Next
    

    EDIT re Comments #2

    The two documents to be compared are identical, so perhaps:

    Dim doc1 As Document
    Dim doc2 As Document
    Dim i As Integer
    
    Set doc1 = Word.Documents("Doc1.doc")
    Set doc2 = Word.Documents("Doc2.doc")
    
    If doc1.Sentences.Count <> doc2.Sentences.Count Then
        MsgBox "These two documents do not match."
        Exit Sub
    End If
    
    For i = 1 To doc1.Sentences.Count
        If doc1.Sentences(i).Characters(1).Bold = True Then
            ''Debug.Print doc1.Sentences(i)
            If doc1.Sentences(i).Text = doc2.Sentences(i).Text Then
                doc2.Sentences(i).Bold = True
            Else
                MsgBox "Sentences do not match."
            End If
        End If
    Next
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I can choose the navigator I want using ⌘ + 1 , ⌘ +
Can I use OpenFileDialog in Android? I want to choose image from OpenFileDialog and
In some code I want to choose n random numbers in [0,1) which sum
I have a 10^7 lines file, in which I want to choose 1/100 of
I got a list<list<string>> in list[x][0] are records from which I want to choose
I have an app with which I want to choose photo or video from
I want to choose a encoding scheme for data storage. I have very low
I want to choose an image formate for including images in both html and
I want to choose random numbers within a range of numbers, but with weighting
I'm setting up a new project and I want to choose a license that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.