Onetastic Macro Documentation >
>
Copying and moving objects Copying and moving objects
With macros you can copy or move existing objects in OneNote. The
CopyObject and MoveObject functions allow copying and moving sections, pages,
outlines, paragraphs, images, embedded files, and tables.
Example
To create a copy of an existing page or to move it, you need a target Section object.
You can specify where in the section you want to copy or move the page:
Copied!
$pageToCopy = GetCurrentPage()
$targetSection = GetCurrentSection()
$newPage = CopyObject($targetSection, $pageToCopy, 0)
MoveObject($targetSection, $newPage, -1)
$fourthPage = CopyObject($targetSection, $pageToCopy, 3)
|