# Convert text links to Devonthink links

**URL:** <https://discourse.devontechnologies.com/t/convert-text-links-to-devonthink-links/50608>\
**Category:** DEVONthink\
**Created:** [October 2, 2019, 11:20am UTC](https://discourse.devontechnologies.com/t/convert-text-links-to-devonthink-links/50608 "2019-10-02T11:20:39Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![cgrunenberg](https://discourse.devontechnologies.com/user_avatar/discourse.devontechnologies.com/cgrunenberg/32/7172_2.png) [@cgrunenberg](https://discourse.devontechnologies.com/u/cgrunenberg)\
**Post date:** [October 2, 2019, 12:21pm UTC](https://discourse.devontechnologies.com/t/convert-text-links-to-devonthink-links/50608/4 "2019-10-02T12:21:20Z")

</div>

Here’s a simple example:

```auto
tell application id "DNtp"
	set theLinks to ""
	repeat with theRecord in (selection as list)
		tell text of theRecord
			repeat with theAttribute in attribute runs
				if exists URL of theAttribute then set text of theAttribute to ((URL of theAttribute) as string)
			end repeat
		end tell
	end repeat
end tell
```

---

_[View the full topic](https://discourse.devontechnologies.com/t/convert-text-links-to-devonthink-links/50608)._
