<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Publishing with Silicon &#187; Hyperlinks</title>
	<atom:link href="http://www.publishingsilicon.com/tag/hyperlinks/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.publishingsilicon.com</link>
	<description>Max Dunn&#039;s electronic publishing blog: reconciling information and rendition technologies</description>
	<lastBuildDate>Tue, 29 Jun 2010 04:06:42 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Scripting Hyperlinks in InDesign</title>
		<link>http://www.publishingsilicon.com/2009/11/scripting-hyperlinks-in-indesign/</link>
		<comments>http://www.publishingsilicon.com/2009/11/scripting-hyperlinks-in-indesign/#comments</comments>
		<pubDate>Mon, 23 Nov 2009 10:08:17 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[InDesign]]></category>
		<category><![CDATA[Hyperlinks]]></category>

		<guid isPermaLink="false">http://www.publishingsilicon.com/?p=29</guid>
		<description><![CDATA[A simple example of scripting external hyperlinks.]]></description>
			<content:encoded><![CDATA[<p>I was asked how to script hyperlinks in InDesign, based on someone who dug up <a href="http://www.siliconpublishing.com/InDesign/CatalogExample.htm">this old article</a> that I wrote many years back, when I still used VBA for InDesign. Well, nowadays I only use JavaScript when scripting, but hopefully this basic example will help:<br />
<code><br />
var myDocument = app.documents.item(0);<br />
with(myDocument.pages.item(0)){<br />
//Get a reference to the text frame.<br />
var myTextFrame = textFrames.item(0);<br />
var myParagraph = myTextFrame.paragraphs.item(0);<br />
myHyperlinkURL = myDocument.hyperlinkURLDestinations.add("http://www.publishingsilicon.com");<br />
myHyperlinkSource = myDocument.hyperlinkTextSources.add(myParagraph);<br />
myHyperlink = myDocument.hyperlinks.add(myHyperlinkSource,myHyperlinkURL);<br />
myHyperlink.visible=false;<br />
}</code></p>
<p>This assumes a text frame exists with some text in it, and that when you export the PDF you either check Include\hyperlinks in the PDF Export dialogue, or do the equivalent with code if exporting programmatically.</p>
<p>I need to get around to updating that data-generated example some day. Amazing how many people around the world seem to stumble upon it.</p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.publishingsilicon.com%2F2009%2F11%2Fscripting-hyperlinks-in-indesign%2F&amp;linkname=Scripting%20Hyperlinks%20in%20InDesign"><img src="http://www.publishingsilicon.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://www.publishingsilicon.com/2009/11/scripting-hyperlinks-in-indesign/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
