<?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>soderlind.no &#187; hacks</title>
	<atom:link href="http://soderlind.no/archives/category/hacks/feed/" rel="self" type="application/rss+xml" />
	<link>http://soderlind.no</link>
	<description>I code for fun</description>
	<lastBuildDate>Thu, 10 May 2012 08:57:37 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Create footnotes from hyperlinks</title>
		<link>http://soderlind.no/archives/2004/10/07/create-footnotes-from-hyperlinks/</link>
		<comments>http://soderlind.no/archives/2004/10/07/create-footnotes-from-hyperlinks/#comments</comments>
		<pubDate>Thu, 07 Oct 2004 19:46:06 +0000</pubDate>
		<dc:creator>Guest</dc:creator>
				<category><![CDATA[hacks]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[Creative Commons]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Microsoft]]></category>

		<guid isPermaLink="false">http://soderlind.no/archives/2004/10/07/create-footnotes-from-hyperlinks/</guid>
		<description><![CDATA[This Microsoft Word 2003 macro is very useful when run against web pages containing a lot of links, after first having cut and pasted them into Microsoft Word 2003. It will mark a hyperlink found with a footnote number and &#8230; <a href="http://soderlind.no/archives/2004/10/07/create-footnotes-from-hyperlinks/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>This Microsoft Word 2003 macro is very useful when run against web pages containing a lot of links, after first having cut and pasted them into Microsoft Word 2003.  It will mark a hyperlink found with a footnote number and put the URL as a footnote.</p>
<p><span id="more-186"></span></p>
<p>Example:</p>
<div><img src="http://soderlind.no/images/footnotefromlink.gif" alt="sample footnote from link" width="460" height="80" align="bottom" /></div>
<pre class="brush: vb; title: ; notranslate">

'****************************************************************************
' CreateFootnotesFromHyperlinks - Copyright (c) 2004 Per Soderlind
'
' The macro creates footnotes from HTML hyperlinks
'
' NOTE:  Very useful when run against web pages containing a lot of
'      links -- after having first cut and pasted the web page into word.
'      The macro is only tested in Microsoft Word 2003
'
' This work is licensed under a Creative Commons License:
'        http://creativecommons.org/licenses/by-nc-sa/2.0/
'
'****************************************************************************
Option Base 1
Public Sub CreateFootnotesFromHyperlinks()
Dim MyRange As Range, i As Long, linkFound As Boolean

linkFound = False
Btn = MsgBox(&quot;Create footnotes from hyperlinks?&quot; + Chr(13) + Chr(13) _
+ &quot;NOTE: Hyperlinks will be removed from the document&quot;, vbYesNo, &quot;Create Footnotes from Hyperlinks&quot;)

If Btn = vbNo Then Exit Sub

For i = ActiveDocument.Hyperlinks.Count To 1 Step -1
If Len(Trim(ActiveDocument.Hyperlinks(i).Address)) &gt; 0 Then
linkFound = True
Set MyRange = ActiveDocument.Hyperlinks(i).Range
ActiveDocument.Footnotes.Add Range:=MyRange,         Reference:=&quot;&quot;,Text:=ActiveDocument.Hyperlinks(i).Address
ActiveDocument.Hyperlinks(i).Delete
MyRange.Style = wdStyleHyperlink
End If
Next i

If Not linkFound Then
Btn = MsgBox(&quot;NO hyperlinks found&quot;, vbExclamation, &quot;Extract Hyperlinks&quot;)
Exit Sub
End If
End Sub
</pre>
<div><a href="http://creativecommons.org/licenses/by-nc-sa/2.0/"><img src="http://creativecommons.org/images/public/somerights20.gif" border="0" alt="Creative Commons License" /></a><br />
<small>This work is licensed under a <a href="http://creativecommons.org/licenses/by-nc-sa/2.0/">Creative Commons License</a>.<br />
For commercial use, please contact me.<br />
</small></div>
]]></content:encoded>
			<wfw:commentRss>http://soderlind.no/archives/2004/10/07/create-footnotes-from-hyperlinks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

