Auto-assemble hyperlinks in Project?

L

LT

Is there a way to automatically assemble and insert a hyperlink on a task
given a set http:// address stem and a piece of text pulled from a custom
text field entry for the same task? For example, the hyperlink stem (a
constant) would always be "http://linkme&taskid=" and the number to pull
exists in a Text2 custom field that gets manually entered by a PM on a task.
So if a PM enters 12345 for the Text2 field on task 15, I want Project to
automatically assemble and assign to the hyperlink address field (or some
other custom field if I have to set one) on that same task 15 the link of
"http://link&taskid=12345". (Essentially saving the PM from having to both
manually enter the 12345 reference number as well as the hyperlink for it.)
 
J

Jim Aksel

Insert a spare field, say Text1.
Right click on the Text1 header and select "Customize Fields", select the
approiate text1 field and then select "Formula"
In the formula box type:
"http://link&taskid="+Text2

Text1 will automatically populate with the full hyperlink including the
contents of Text2. If you want to get a little fancier, you can display the
link only of Text2 actually contains something:

IIf(Text2="","","http://link&taskid="+[Text2])
 
J

Jim Aksel

Here's a Macro that will do it for you as well. This will insert into the
Hyperlink field. However, you have to execute the Macro:

Sub Macro1()
Dim t As Task
For Each t In ActiveProject.Tasks
If t.Text2 <> "" Then
t.Hyperlink = "http://taskme&id=" + t.Text2
End If
Next t
End Sub

You could also replace t.Hyperlink with t.Text1 and you would have the same
thing as my other post (but no automatic update).
 

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