Onetastic Macro Documentation >
>
>
Window_Close Window_Close
Closes the given OneNote window. If the given window is the current window, one of the other windows will become the current window. Closing last window may cause unexpected results as it will shut down OneNote and the notebooks will no longer be accessible to the currently running macro. Accessing a closed window's members will result in an error.
Syntax
void Window_Close(Window window)
Parameters
- Window window
- The window to close.
Examples
foreach ($window in GetWindows())
if (!$window.isCurrent)
Window_Close($window)
|