Consulting

Results 1 to 2 of 2

Thread: Deleting Text At Bookmark Along With The Paragraph Below It

  1. #1
    VBAX Contributor
    Joined
    Jun 2014
    Posts
    114
    Location

    Deleting Text At Bookmark Along With The Paragraph Below It

    I currently have a code that will delete a bookmark from a word document using the portion of my code displayed below:
    For i = LBound(BookMarksToDelete) To UBound(BookMarksToDelete)
        wdDoc.Bookmarks(BookMarksToDelete(i)).Delete
    Next i
    Based on the snippet above, I was curious to if there was a way for me to recreate this portion in order to delete the text at the bookmark, along with the paragraph underneath it (Word document is in the form Header followed by Paragraph starting on next line)

    please help me out,

    Thank you in advance

  2. #2
    VBAX Expert
    Joined
    Sep 2016
    Posts
    788
    Location
    Word VBA?

    wdDoc.Bookmarks(BookMarksToDelete(i)).Range.Paragraphs(1).Range.Delete

Tags for this Thread

Posting Permissions

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