Macro to Update MS Project 2003 Hyperlinks

J

Jeff Jones

I'm having an opportuntiy in that I've got 400 or so hyperlinks in a
project schedule that need to be updated. These links all have a
constant data value being passed to the browser to bring up the
process supporting the schedule. The problem is that the defined
process is changing so this process id constant is changing. I need
to update every link.

Does anyone have any suggestions for the code needed to spin through
every task to edit or to just select and edit every hyperlink so I can
make the change and save the changed hyperlink and move on to the
next?

I'm running MS Project Professionsl 2003 SP1.

Thank you.
Jeff Jones
(e-mail address removed)
 
J

Jeff Jones

Never mind, in case you look at this opportunity. I figured out the
macro I needed. It turned out to be rediculously simple. Here's the
code.

Sub Change_Hyperlinks()
' Macro Change_Hyperlinks by Jeff Jones
' Macro Created Thu 3/28/06
'

Dim T As Task
Dim H ' Hold hyperlink
Dim W ' Hyperlink working area

For Each T In ActiveProject.Tasks
If Not (T Is Nothing) Then
H = T.Hyperlink
If Len(H) > 0 Then
W = T.Hyperlink
W = Replace(W, 37878, 54321)
T.HyperlinkAddress = W
End If
End If
Next T

End Sub


Jeff
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top