List hyperlinks from search in new page
Description | : | List hyperlinks from search in new page |
Download |
||
---|---|---|---|---|---|
Author(s) | : | martyh1 | |||
Category | : | Find | |||
Last Updated | : | June 20, 2016 | |||
Requirements | : | OneNote 2010 or above | |||
Screenshot | : | ||||
![]() List hyperlinks from search in new page |
|||||
Changelog | : | June 20, 2016 (CD385D) - martyh1 These versions are no longer supported: May 16, 2016 - martyh1 |
This seems a better macro for me, than what I was trying to create :)
I noticed that the macro didnt find multiple keywords?
It does work when you search for 1 Keyword.
When you have a chance do test it out
and thanks a lot for all your help as always
:)
I am trying to
Hyperlink to Pages that only have a search term in the page somewhere. Not in the TITLE - that macro I created the other day.
Now
Search for pages in a section.
If the PAGE TEXTor paragraph has XX anywhere
Hyperlink to those page names only.
Eg
Football Games
XX You can also type a keyword to search online for the video that best fits your document. To make your document look professionally produced, Word provides header, footer, cover page, and text box designs that complement each other.
Baseball Games
Word provides header, footer, cover page, XX and text box designs that complement each other.
================================
Ouput Hyperlinks in Current Page :
Football Games
Baseball Games
Sorry for misunderstanding it seems simple but I cant figure it out :(
I am trying to List Pages that contain the text XX any where on the page.
I just cant make it work :(
Create a List of Page Names that contain the Text XX with a hyperlink to the page
Hyperlink to the Page Name
<Macro name="HYPERLINK - to Specific Pages ONLY " category="Test" description="Hyperlink to ONLY SPECIFIC Pages - that have a XX in the Page >
<Comment text="-----------------------------------------------" />
<Comment text="Hyperlink to ONLY SPECIFIC Pages - that have a XX in the page text " />
<Comment text="-------------------------------------------" />
<ForEach var="oPage">
<Array>GetCurrentSection().pages</Array>
<ForEach var="Text">
<Array>QueryObjects("Text", GetCurrentSection())</Array>
</ForEach>
<If>
<Condition>String_Contains("Text", "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 = $oPage.hyperlink</Expression>
</If>
</ForEach>
</Macro>
I just cant work it out, please advise