JFodness
11-27-2007, 11:16 AM
I've come into possession of a handful of Word .doc files that have been used as impromptu databases, each containing tables or lists of hyperlinks and (standard text) descriptions of the hyperlinked document.
I need to find away to search through the document, grab the hyperlinks, make a copy of each hyperlinked document and have those copies saved in a seperate folder.
The files which the documents hyperlink to are all stored server-side, but the documents I'm searching aren't necessarily on the same letter drive as the hyperlinked documents. It is likely that a few of the hyperlinked documents no longer exist, so an "if exists" check or at least an error bypass to continue copying the rest of the hyperlinks would be necessary as well.
As an example, if I have a word document with a hyperlink to \\Xserver\Xfolder\Document Folder\Document Name.pdf, I need a macro that will run through the document and save a copy of that hyperlinked pdf, so after running the macro I'd have an additional copy of "Document Name.pdf" stored in a seperate folder.
The documents contain hundreds of hyperlinks, doing this by brute force could be a nightmare. I'm not very good with VBA but I have some very modest coding experience, so I can try to follow along and provide any other information or feedback as necessary.
Any assistance is greatly appreciated.
I need to find away to search through the document, grab the hyperlinks, make a copy of each hyperlinked document and have those copies saved in a seperate folder.
The files which the documents hyperlink to are all stored server-side, but the documents I'm searching aren't necessarily on the same letter drive as the hyperlinked documents. It is likely that a few of the hyperlinked documents no longer exist, so an "if exists" check or at least an error bypass to continue copying the rest of the hyperlinks would be necessary as well.
As an example, if I have a word document with a hyperlink to \\Xserver\Xfolder\Document Folder\Document Name.pdf, I need a macro that will run through the document and save a copy of that hyperlinked pdf, so after running the macro I'd have an additional copy of "Document Name.pdf" stored in a seperate folder.
The documents contain hundreds of hyperlinks, doing this by brute force could be a nightmare. I'm not very good with VBA but I have some very modest coding experience, so I can try to follow along and provide any other information or feedback as necessary.
Any assistance is greatly appreciated.