Page 1 of 1

Plain Newline macro with no List, TOC, bold, color - Solved

Posted: 2013-09-16 05:32:11
by CrisB
Hi,

I'm trying to revise Martin's nice new Remove Lists newline to also remove the ToC style. This is an attempt to overcome the lack of a fully functional NWP "Remove Styles and Attributes' command, one which actually works as stated and also removes List and TOC styles. A "Remove Everything" command.

Whether I'm inserting a new line before or after the current cursor point at the beginning or end of the current line, I need the macro to give the new line no list style and no TOC style. So I tried this macro, without the first menu-TOC-remove-command (initially), but it does not remove the TOC both when the newline is before as well as after the text on the current line. Then I tried this macro now with a duplicated initial menu-TOC-remove-command as well as ending menu-TOC-remove-command. But it still does not work properly.

Please, how do I improve this menu to remove both List styles and TOC styles whether I'm inserting before or after the current line?

Thanks for your help
Cris

Re: How to change newline macro to remove both List & TOC st

Posted: 2013-09-20 16:35:27
by martin
Hi Cris, I'm not sure I understand what you mean by "when the newline is before as well as after the text on the current line". I tried running the macro with the insertion point both at the start, middle, and end of a paragraph marked for TOC inclusion; in all cases the newly created paragraph was not marked for TOC inclusion.

If you could attach (or email) a document where the macro does not work as you expect, that would be helpful. Please have the document saved so it reopens with the selection/caret exactly as it should be to see the failure.

Re: How to change newline macro to remove both List & TOC st

Posted: 2013-09-23 08:22:28
by CrisB
Reply just emailed via NWP's great Send Feedback system...
much appreciate your help, Martin.

warm regards, Cris

Re: How to change newline macro to remove both List & TOC st

Posted: 2013-09-23 15:05:42
by martin
Cris and I communicated privately and this attached macro is the result. Conceptually it inserts a new plainly formatted paragraph (ie: Normal style, no list items, no TOC inclusion). If you run it when the selection is at the start of a paragraph, then the new paragraph is inserted before; if you run it with a selection at the end of a paragraph, then the new paragraph appears afterwards.

Re: How to change newline macro to remove both List & TOC st

Posted: 2013-09-23 22:01:57
by CrisB
Thanks a million, Martin. It works perfectly.

And wow, that code is complicated... :-)

warm regards
Cris

Re: How to change newline macro to remove both List & TOC st

Posted: 2013-10-18 22:31:11
by CrisB
To get this macro to insert a TOTALLY plain line, one that also has no color nor bolding etc, then it also needs the following two lines

Menu 'Format:Remove Attributes Except Styles'
Menu 'Character Style:Remove Character Styles'

Re: Plain Newline macro with no List, TOC, bold, color - Sol

Posted: 2013-10-20 11:10:02
by CrisB
Maybe I should have attached this macro which now gives a totally unformatted blank paragraph no matter how it was formatted before...

Cris