Clipboard Access, HTML Objects, and Ability to Copy and Move Content
April 20, 2025
Onetastic 7 is available with powerful new abilities to access system clipboard, import and export HTML from OneNote content as well as ability to copy and move sections, pages, and page contents in OneNote.
Clipboard Access
You can now read from and write to system clipboard and access any plain text, HTML or image content in the clipboard. This can allow you to copy content from OneNote in various formats as well as paste content into OneNote programmatically. Following functions facilitate these:
- Clipboard_Get
Returns information from the clipboard for the specified format.
- Clipboard_Set
Puts information into the clipboard.
- Clipboard_Query
Returns whether the clipboard contains the specified format or not.
HTML Objects
Applications often use HTML as the format for transferring rich content through Clipboard or other mediums. To help with this you can now export content from OneNote into HTML format as well as import HTML content into OneNote. See details of following new function and object type for more information:
- GetFormattedObjectContent
Returns the contents of an object in either plain text or HTML format. This can be useful to put the content into clipboard using Clipboard_Set, or process it further.
- HtmlBlock object
A new object type that represents a block of HTML to be inserted into a OneNote Outline or Cell.
Copying and Moving Content
OneNote has complex content structure, as such copying a page would require creating outlines, tables, rows, cells, paragraphs, and text objects and copying properties of each object correctly. With the following new functions, you can easily copy sections to other notebooks, pages to other sections or page contents to other pages without worrying about recreating the object structure:
- CopyObject
Creates a copy of a given object and inserts it into OneNote hierarchy or into a OneNote page.
- MoveObject
Moves a given object from its current parent to a new parent.
These new functions and the new HtmlBlock object will allow a wide range of new macros to be created with Onetastic and added to your toolbox of power tools. Stay tuned for new and updated macros to appear in Macroland in the upcoming weeks.
Comments