<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Running a macro on all open docs]]></title><description><![CDATA[<p dir="auto">Hi<br />
Is there a way to run a macro on all open documents? Currently I have to open each document to run a macro which is a pain. I’ve tried multi-selecting the tabs but that doesn’t work.<br />
Thanks.</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/12780/running-a-macro-on-all-open-docs</link><generator>RSS for Node</generator><lastBuildDate>Sat, 18 Jul 2026 11:40:22 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/12780.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 23 Nov 2016 11:51:24 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Running a macro on all open docs on Thu, 24 Nov 2016 09:40:39 GMT]]></title><description><![CDATA[<p dir="auto">Thanks for the reply! The individual files are XML order files and have lines which include the number of orders in that particular file. Merging them all into one wouldn’t be ideal without being able to extract them all after - possibly using a custom header as you mention. Ideally, the files also need to retain their filenames.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/19447</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/19447</guid><dc:creator><![CDATA[Andy Bayley]]></dc:creator><pubDate>Thu, 24 Nov 2016 09:40:39 GMT</pubDate></item><item><title><![CDATA[Reply to Running a macro on all open docs on Wed, 23 Nov 2016 22:27:41 GMT]]></title><description><![CDATA[<p dir="auto">Hello, <strong>Andy</strong>,</p>
<p dir="auto">I don’t think this is <strong>native</strong> feature of N++. But, I do agree, with you, that this feature could be <strong>very interesting</strong> !</p>
<p dir="auto">As a <strong>work-around</strong>, you could :</p>
<ul>
<li>
<p dir="auto"><strong>1</strong>) Gather the contents of <strong>all</strong> your <strong>opened</strong> documents, in a <strong>new</strong> tab</p>
</li>
<li>
<p dir="auto"><strong>2</strong>) Run your <strong>macro</strong>, on this <strong>big</strong> file, ONLY</p>
</li>
<li>
<p dir="auto"><strong>3</strong>) Replace the <strong>original</strong> contents of <strong>each</strong> file, by <strong>each modified</strong> part : I know, quite tedious :-((</p>
</li>
</ul>
<hr />
<p dir="auto">The good news is that <strong>Claudia</strong> or <strong>Scott</strong> could build a <strong>Python</strong> script, or <strong>Dail</strong> with a <strong>Lua</strong> script, which would do <strong>all</strong> these steps, in one go :-)) At least, the steps <strong>1</strong> and <strong>3</strong>, anyway !</p>
<ul>
<li>
<p dir="auto">We just need, in phase <strong>1</strong>, to <strong>separate</strong>, in that <strong>big</strong> file, the contents of <strong>each individual</strong> file by inserting any <strong>header</strong>, with the name of the file( as, for instance, <strong>======== sample.txt =========</strong> ), followed by its contents</p>
</li>
<li>
<p dir="auto">In phase <strong>3</strong>, the script would <strong>replace all</strong> the contents of <strong>each individual</strong> file by the <strong>appropriate</strong> part ( known from the <strong>header</strong> ! ) of the <strong>complete</strong> file</p>
</li>
</ul>
<p dir="auto">Best Regards,</p>
<p dir="auto">guy038</p>
]]></description><link>https://community.notepad-plus-plus.org/post/19441</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/19441</guid><dc:creator><![CDATA[guy038]]></dc:creator><pubDate>Wed, 23 Nov 2016 22:27:41 GMT</pubDate></item><item><title><![CDATA[Reply to Running a macro on all open docs on Wed, 23 Nov 2016 12:37:48 GMT]]></title><description><![CDATA[<p dir="auto">. . . or run a macro on all of the docs in a single folder . . . ?</p>
]]></description><link>https://community.notepad-plus-plus.org/post/19427</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/19427</guid><dc:creator><![CDATA[Andy Bayley]]></dc:creator><pubDate>Wed, 23 Nov 2016 12:37:48 GMT</pubDate></item></channel></rss>