Consulting

Results 1 to 2 of 2

Thread: Sleeper: VBA to get Section Headding name from word document

  1. #1

    Sleeper: VBA to get Section Headding name from word document

    I know how to extract comments from word document using VBA but I am not able to get section heading name under which a comment is enterd.

    Here is code to extract comment ...

    Dim oDoc As Word.Document
    Dim objComment As Word.Comment
    Dim oCommentedTextSentence as String
    Set oDoc = oWordApp.Documents.Open(“c:\samplefil1.doc”, , True) 
    Set objComment = oDoc.Comments
    'Refer the Comment Object
    objComment.Reference.Select
    'Extract the comment and display
    oCommentedTextSentence = objComment.Reference.Sentences.Item(1).Text
    msgbox (oCommentedTextSentence)

    Any help in this regard is much appritiated.

  2. #2
    VBAX Wizard
    Joined
    May 2004
    Posts
    6,713
    Location
    section heading name ???????

    Sections do not have names. Nor do headings.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •