Description | : | Rename Links - useful for batch renaming links to a single name - good for tables when link acts as a button to launch a media file or site | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Author(s) | : | ben303 | |||||||||
Category | : | Hyperlink | |||||||||
Last Updated | : | June 19, 2016 | |||||||||
Requirements | : | OneNote 2010 or above | |||||||||
Screenshot | : | ||||||||||
![]() Rename Links to Single Name
|
|||||||||||
Changelog | : | June 19, 2016 (ADB722) - ben303 These versions are no longer supported: July 28, 2015 - ben303 |
:)
I am trying to create hyperlinks to pages that contain ONLY contain - XX in the Page Title
I have been stuck on this for days :(
<Macro name="Hyperlink - To Page - IF Title Contains XX" category="Test" description="" publishDate="00-00-00T00:00:00.000Z" version="15">
<ForEach var="oPage">
<Array>GetCurrentSection().pages</Array>
<If>
<Condition>String_Contains($oPage.name, "XX", true)</Condition>
<Expression>$Page = GetCurrentPage()</Expression>
<Expression>$Outline = InsertObject($Page, "Outline", -1)</Expression>
<Expression>$Paragraph = InsertObject($Outline, "Paragraph", 0)</Expression>
<Expression>$Text = InsertObject($Paragraph, "Text", -1)</Expression>
<Expression>$Text.value = $oPage.name</Expression>
<Expression>$Text.hyperlink = (($hyperlink & "#") & $Page.name)</Expression>
</If>
</ForEach>
</Macro>
The hyperlink doesn’t work
Any ideas?