Search Multi-Keywords
Description | : | Search the paragraphs containing all the multiple keywords within a scope, and create a new page reporting the search results in the current section. Use semicolons (;) to separate the keywords, e.g. keyword1;keyword2;keyword3. There is (theoretically) no limit to the maximum number of keywords. But the speed is optimized for searching three keywords, and it slows down when more than three keywords are used. There are five opinions of scopes available, namely, “Current Page”, “Selection”, “Current Selection”, “Current Notebook”, and “All Notebooks”. It can take a long time, if search in notebook(s). Skip function is available, that is mainly for excluding pages that contain the previous search reports, to avoid duplicating the search results. Skip can take place in all scopes except the “Current Page” opinion. Change the texts as if you desired. It will skip the pages if their names contain the defined string. The report page lists the matched paragraphs and where they are found in. |
Download |
||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Author(s) | : | Chris K.Y. FUNG | |||||||||||||
Category | : | Find | |||||||||||||
Last Updated | : | November 03, 2016 | |||||||||||||
Requirements | : | OneNote 2010 or above | |||||||||||||
Screenshot | : | ||||||||||||||
![]() Search Multi-Keywords
|
|||||||||||||||
Changelog | : | November 03, 2016 (C12A1D) - Chris K.Y. FUNG June 19, 2016 (C328CE) - Chris K.Y. FUNG These versions are no longer supported: July 30, 2014 - Chris K.Y. FUNG |
Despite the scope being set to 'Current Page', it basically searches other pages as well. Besides that, when testing it out, I couldn't get it to display the results...
I insanely want (and need) this Macro, but... yeah, is there any chance of it being fixed sometime? Please guys...
For each $Page in CurrentSection().pages
$Texts = QueryText($Page, "#", true)
$Texts[0].value = "Hello"
how do i make it do it for all pages now in the section
In each Page there is a #
The First # you find replace with "Hello"
Now do the next page ....etc
<Expression>$Text = QueryText(GetCurrentPage(), "#", true)</Expression>
<Expression>$Text[0].value = "Hello"</Expression>
I still cant figure it out :(
In each page in the section I just wanted to replace the first time it finds a # for example and replace it with a word "Hello"
is this possible?
I cant seem to replace the first instance in the Current Section Pages :(
Not sure what i have done wrong
<Macro name="Replace First Instance - Current Section publishDate="00-00-00T00:00:00.000Z" version="15">
<Comment text="Replace the First Instance of a Search Term -Section" />
<ForEach var="Page">
<Array>QueryObjects("Page", GetCurrentSection())</Array>
<Expression>$Text = QueryText(GetCurrentSection(), "#", true)</Expression>
<Expression>$Text[0].value = "Hello"</Expression>
</ForEach>
</Macro>
any tips thank you
It worked now
:)
Thank you
I made the simple 2 lines
<Macro name="ReplaceFirst Instance" category="TEST" description="" publishDate="00-00-00T00:00:00.000Z" version="15">
<Expression>$AllInstancesOfTheWordOnetastic = QueryText($CurrentPage, "#", true)</Expression>
<Expression>$AllInstancesOfTheWordOnetastic[0].value = "Hello"</Expression>
</Macro>
it Said expected an object at second parameter :(
I couldn’t get it to work :(
<ForEach var="Text">
<Array>QueryObjects("Text", GetCurrentSection())</Array>
<Expression>$Text.selected = false</Expression>
</ForEach>
<ForEach var="Text">
<Array>QueryText(GetCurrentSection(), "#", true)</Array>
<Expression>$Text[0].value = "hello"</Expression>
</ForEach>
</Macro>
Any ideas
Thank you
Hello Omer,
How can I replace only the first time the word is found
$AllInstancesOfTheWordOnetastic = QueryText($CurrentPage, "Onetastic", true)
Replace the first instance of onetastic with "Hello" for example
just a quick one in VBA ChrW(8300)
How would i encode that so that a macro in onetastic will understand i am looking for ChrW(8300)
QueryText(GetCurrentSection(), "", true)
didn't work :(
it worked!
Have a great weekend :)
$i += 1
$Text.value = "XXX" & $i
Hi Omer,
Hope you are well.
I am trying to number each time "XXX" is found to XXX1, XXX2,XX3 etc
<Expression>$i = 0</Expression>
<ForEach var="Text">
<Array>QueryObjects("Text", GetCurrentPage())</Array>
<Expression>$Text.selected = false</Expression>
</ForEach>
<ForEach var="Text">
<Array>QueryText(GetCurrentPage(), "XXX", true)</Array>
<Expression>$Text.value = ("XXX" & "$i + 1")</Expression>
</ForEach>
</Macro>
Is this the correct way
Thank you :)
Works great for me..:)
Jeremy