Consulting

Results 1 to 6 of 6

Thread: Add a comment in the document when a broken link is found

  1. #1

    Add a comment in the document when a broken link is found

    Hello,
    I am trying to write a macro that will find a broken link in a word document and automatically add a comment to that link saying "High: Broken Link".
    Thanks in advance

  2. #2
    Knowledge Base Approver VBAX Guru macropod's Avatar
    Joined
    Jul 2008
    Posts
    4,435
    Location
    It's not apparent to me how Word would recognise a 'broken' link. Besides which, you don't say what kind of link it might be (e.g. hyperlink, OLE link, cross-reference, or even an out-of-date TOC entry).
    Cheers
    Paul Edstein
    [Fmr MS MVP - Word]

  3. #3
    I apologize Paul. I meant to write hyperlink

  4. #4
    I am looking for a macro code for MS word which will validate all the hyperlinks in the word document and the ones that fail to take me to correct website , a comment saying "Link doesn't work" should be automatically added in the document.

  5. #5
    Knowledge Base Approver VBAX Guru macropod's Avatar
    Joined
    Jul 2008
    Posts
    4,435
    Location
    Word can't do that - you'd have to automate IE, for example, and use that to test each of the Word hyperlinks. I'm not sufficiently well versed in IE
    automat
    ion for that.
    Cheers
    Paul Edstein
    [Fmr MS MVP - Word]

  6. #6
    Knowledge Base Approver VBAX Guru macropod's Avatar
    Joined
    Jul 2008
    Posts
    4,435
    Location
    Cross-posted at: https://answers.microsoft.com/en-us/...18e4da8?auth=1
    Please read VBA Express' policy on Cross-Posting in item 3 of the rules: http://www.vbaexpress.com/forum/faq...._new_faq_item3
    Cheers
    Paul Edstein
    [Fmr MS MVP - Word]

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
  •