Deploy Macros Automatically

March 04, 2017

A new version of Onetastic is available with new options for deployment, ability to disable editing and downloading macros, and some Macro Editor improvements.

Deploying macros as part of installation

Many users want the ability to deploy a given set of macros automatically while installing Onetastic. This can now be done using the Installation Configuration File. You can specify a configuration file with a list of macros during installation and those macros will automatically be downloaded when you start OneNote:

<?xml version="1.0" encoding="utf-8"?> <Config> <Features> <Macros> <Install> <!-- Sort Pages, latest available version --> <Macro id="091883EFBE344BFCBE73A7E113FE0190" /> <!-- Insert Monthly Calendar, version 6B0879 --> <Macro id="D2FDC7FB1940482386EACA5B74B0AFBC" version="6B0879" /> <!-- Search and Replace, latest available version --> <Macro id="20F029487157446B81830EAA645A2214" /> <!-- TOC in Current Section, version F62144 --> <Macro id="6A3765E072234EA7B0942A2BE0D14C2B" version="F62144" /> </Install> </Macros> </Features> <License type="client"> <Email></Email> <ProductKey>AAAAA-12345-BBBBB-67890-CCCCC</ProductKey> </License> </Config>

This allows either installing the latest available version of the macro or a specific, potentially older version of the macro in case you don’t want any future versions of a macro to be deployed without your knowledge. Macro pages now display each version of the macro with a date, version number and a brief description.

Macro Page

Read more about this feature at: How to Deploy Macros Automatically

Preventing users from downloading or editing macros

Along with the ability to automatically deploy macros, you can now specify options in the configuration file to disable macro editing and download features. This way if you deploy certain versions of macros that you tested for your organization, you can ensure that no other macros or no other versions of those macros will be installed. Read more about this at: How to Prevent Users from Downloading or Editing Macros

Macro Editor improvements

"Save & Close" button in Macro editor

Macro Editor now has a Save & Close button to quickly close it while saving the changes.

Macro Editor's screen position

Macro Editor now remembers the size and position of the window from the last time it was open. This way if you want it at a certain location with a certain size, you will not have to keep resizing and repositioning it.

Bug Fixes

Missing type property to Text objects

Macro Documentation had a "type" property for Text objects, but trying to use that property would result in a Macro error. This is now fixed.

Macro Updates

Following macros in Macroland are updated:

Diary Pages

Created date for the pages are now set to the same date as in the page title

Insert Monthly Calendar

Fixed an issue where Month dropdown wouldn't have the current month selected

Set Page Date & Time

Added option to set the date as well as the time

Search & Replace in Hyperlinks

Updated to search and replace hyperlinks in images as well as text

Insert Short Date Stamp

Fixed an issue where the macro would not insert the date correctly and would always insert it to the title

Insert Horizontal Line between Paragraphs

Fixed an issue where this macro wouldn't work if there are multiple Outlines on the page.

Sort Pages By Date

Fixed an issue where the macro would sort pages in all sections in the current notebook even though Current Section was selected as the scope

Convert Paragraph Font to Segoe UI

The title stated the font was Segoe Pro, but it is actually Segoe UI. Also updated the description.

Outlook FROM SubPager

Added more error checks for section format to match. More in code and end user documentation. Optimized code after translation from v8 to v11

Insert Yearly Calendar

Added selectors: - Day Width - Day height - month column numbers

Also used newlines instead of paragraphs for 2016 performance bug fix.

New Macros

Several new macros have been added to Macroland since the last update. Check them out:

Sort Paragraphs by Highlight Color

Sort selected the paragraphs by the highlight color on them. You can use this after using "Extract Highlighted Text" macro to sort the extracted text by highlight color

Insert Monthly Calendar - Alternative Junaid edited

Inserts a calendar of the selected month and year; Large format option enables setting a width and height.


Insert YYYY-MM-DD. A variant of the macro Insert YYYY/MM/DD

Sort Pages Ascending

Sort each page in current section by name in ascending order, sub pages stay under their parent pages and sorted among themselves

Daily Manager Log

Creates a Daily Manager Log page for each day in the whole year or a month

Highlight Hashtags

Highlights hashtags (#word)

Untag/Select All Completed Tasks

Untag and select all completed checkbox tasks for easy deletion within the page being edited.

Insert Horizontal Line (A4)

Inserts a horizontal line adjusted for notes (A4)

Perfect Printouts II

Puts printouts on the left against the margin line and removes the vertical gap between each page/slide. Pages/slides are not given numbers and not turned into part of the background.

Color PowerShell Comments + NoSpell

Changes color of text starting with a hash comment (#) on selected lines to green and remove spell checks

Color PowerShell Comments

Changes color of text starting with a single quote (#) on selected lines to green

Show Month

This macro will draw a month calendar for the specified month. The events are the titles of pages form one or two sections in the same notebook, based on teh dateTime for the page. A page whose title has a tag will show the tag instead of the time. Each calendar event links to the relevant page

Sort Sections

Sort each section in current section group by name

Outlook Email Date Stamp

This macro will change the creation date of each page in the current section with the time the email was sent, allowing them to be sorted by the email date. This has been made specifically for emails sent to OneNote from Outlook.

全页字体设为微软雅黑 (Set font to Microsoft Ya black on whole page)

点击这个脚本,即可将当前页的文本全部设置为微软雅黑 (You can set all the text on the current page to Microsoft Ya black)

Replace [KW] with current calendar week

Replaces placeholders with pattern [KW] or [KW]+d; (where d is a digit) with the corresponding calendar week (adding the digit behind +)

Replace [KW] with current calendar week

Replaces placeholders with pattern [KW] or [KW]+d; (where d is a digit) with the corresponding calendar week (adding the digit behind +)

Replace [KW] with current calendar week

Insert Number of the week


xionglin - 2018-02-09
Hi, Omer
I'm agree with Ralf69's suggestion.
Removing text and Delete some objectives is used to modify the page's  contents frequently.
Hope you can add this feature ASAP.
Omer Atay - 2017-04-17
Ralf 69: Removing content is not currently possible with macros. I will add this to the list for a future update.
Ralf 69 - 2017-04-17
"Remove extra empty paragraphs / blank lines" - Is there a Onetastic macro for it?
When I copying some external material text, it often happens, that there are too many blank lines.
Also in order to move from Evernote to OneNote, the importer creates for each blank line a nother second blank line in my case.
It would be nice to remove all double or multiple lines with one click, and merge them each into one blank line.
After this macro, all paragraphs should be separated each by only one blank line, and not many in between.

Other Posts

Show all posts