The code replaces the part of the link specified in OldString with the text specified in NewString. Have you actually run the macro?

If you can supply an example of the old hyperlink and its corresponding new one, I can make the adaptations to the code for you.