Question

  • Creator
    Topic
  • #2224883

    writing macros for word to insert hyperlinks

    Locked

    by Anonymous ·

    I am newbie, I want know how to write a macro that will open a folder in network share and auto link all th files present in that folder as hyperlinks in a word file. E.g : \\networkshare\folder a\
    has files a,b and c. a macro that will insert hyperlinks in a word document

    \\networkshare\folder a\file a
    \\networkshare\folder a\file b
    \\networkshare\folder a\file c

    Thanks in advance!!!

All Answers

  • Author
    Replies
    • #2635414

      Clarifications

      by Anonymous ·

      In reply to writing macros for word to insert hyperlinks

      Clarifications

    • #2635411

      Word will change it to a hyperlink automatically

      by faradhi ·

      In reply to writing macros for word to insert hyperlinks

      unless you changed the auto correct options.

      However if you have spaces you have to enclose the path in double quotes.

      • #2634844

        clarification

        by Anonymous ·

        In reply to Word will change it to a hyperlink automatically

        It does recognize it as a hyper link, I want to know whether we can automate this process, so that it can add links to all files in a folder as hyperlinks in a recursive manner

        • #2634688

          HMMM! I am sure you can do it using VBA

          by faradhi ·

          In reply to clarification

          However,I am not a programmer and could not tell you exactly how.

          I am sorry.

          Thanks for the thumbs up! It is a little thing but does help.

      • #2634746

        New to TR…

        by absolutely ·

        In reply to Word will change it to a hyperlink automatically

        [b]AND[/b] knows how to “mark answers as helpful”?

        I am just … stunned.

        • #2634609

          Its great.

          by faradhi ·

          In reply to New to TR…

          Maybe it is catching too.

    • #2635397

      If the network location is mapped to a drive letter

      by absolutely ·

      In reply to writing macros for word to insert hyperlinks

      You can use the Command Prompt.

      Type the letter of the network drive letter…

      N: [Enter]
      dir /B /S /D > “C:\[path]\file.txt” [Enter]

      [Quotes are necessary above if the path contains any spaces, such as “Documents and Settings”.]

      Open “file.txt” in Word. As faradhi suggested, a macro is probably unnecessary.

Viewing 2 reply threads