Remove Paragraph and Line Breaks
Description | : | Removes paragraph breaks and line breaks on selected paragraphs and merges them into a single paragraph |
Download |
---|---|---|---|
Author(s) | : | Onetastic | |
Category | : | Content | |
Last Updated | : | June 28, 2020 | |
Requirements | : | OneNote 2010 or above | |
Screenshot | : | ||
![]() Remove Paragraph and Line Breaks No screenshot available for this macro. |
|||
Changelog | : | June 28, 2020 (A0A775) - Onetastic May 12, 2018 (48D345) - Onetastic June 20, 2016 (7EA38C) - Onetastic These versions are no longer supported: July 26, 2014 - Onetastic |
Nevertheless i have noticed it leaves all the text without the font formatting, like blacked or underlined text, ends like regular text. Would it be possible to create a non edditing version of the macro?
I would like to remove the paragraph breaks between SETS of paragraphs that start with
XX1 and end in XX2.
example
================
XX1
Video provides a powerful way
to help you prove your point.
When you click Online Video,
you can paste in the embed
code for the video you want to add.
XX2
===============
I tried for days to do this - but its not working :(
<Macro name="Remove Paragraph Breaks" category="Paragraphs" description="" publishDate="00-00-00T00:00:00.000Z" version="15">
<Comment text="Remove Paragraph Breaks Between XX1 and XX2" />
<Expression>$text = ""</Expression>
<Expression>$FirstParagraph = ""</Expression>
<ForEach var="Paragraph">
<Array>QueryObjects("Paragraph", GetCurrentPage())</Array>
<If>
<Condition>$Paragraph.selection == "none"</Condition>
<Continue>1</Continue>
</If>
<If>
<Condition>!String_EndsWith($text, "XX2 ", false) && ($text != "")</Condition>
<Expression>$text += " "</Expression>
</If>
<Expression>$text += $Paragraph.text</Expression>
<Expression>$Paragraph.text = ""</Expression>
<If>
<Condition>$FirstParagraph == ""</Condition>
<Expression>$FirstParagraph = $Paragraph</Expression>
</If>
</ForEach>
<If>
<Condition>$FirstParagraph != ""</Condition>
<Expression>$FirstParagraph.text = $text</Expression>
</If>
</Macro>
Thank you for any help - I am really grateful otherwise i have to go through long long document and do this manually :(
Thanks, Omer!!