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 8083669
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T17:32:55+00:00 2026-06-05T17:32:55+00:00

I have been trying to figure out how to read paragraph content which exists

  • 0

I have been trying to figure out how to read paragraph content which exists a heading. The heading itself is part of the table of contents. The heading will have a particular style (say Heading 1).

For example: “Introduction” is a entry in Table of content with style Heading 1. I want to read content under heading “Introduction” but not any more content (i.e not content under sub headings of Introduction)

I have been trying to do this using styles/style, TableofContent, Paragraphs/Paragraph,Range. Still cannot come up with a effective solution.

I am working in VB.NET in VS 2010. I am using the word 2007 object model (office 2007 interop) as described @ http://msdn.microsoft.com/en-us/library/bb244515(v=office.12)

Any pointers would be appreciated

regards
Sameer

  • 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-06-05T17:32:56+00:00Added an answer on June 5, 2026 at 5:32 pm

    Finally i got the solution.

    The code snippet below detects paragraphs which have “Heading 1” style

       For Each paragraph As Paragraph In doc.Paragraphs
            Dim style As NetOffice.WordApi.Style = paragraph.Style
            If style.NameLocal = "Heading 1" Then
                paragraph.Next()
                Console.WriteLine(paragraph.Range.Text)
                Console.WriteLine("*********")
            End If
        Next
    

    Thanks

    Sameer

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been trying to figure out why it doesn't read my second getline()
Alright I have been trying to figure this out and I read the MSDN
I have been trying to figure out why I am getting this problem and
I have been trying to figure out how to open a file from the
I have been trying to figure out a solution but nothing has really presented
I have been trying to figure out a way to tag several methods from
I have been trying to figure out why and how to use performSelector. I
I'm a bit new to js and have been trying to figure out how
I'm working on a web-accessible API and have been trying to figure out the
I have been trying to figure this out for quite a while, but what

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.