Question Locked

writing macros for word to insert hyperlinks

0 helpful
7 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

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!!!

7 replies

by Former member

Clarifications

by faradhi

unless you changed the auto correct options.

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

by Former member

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

by faradhi

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.

by absolutely

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

I am just ... stunned.

by absolutely

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.

This discussion is closed to new replies.