Renames the current OneNote section per DialogBox user input.
// Get the current section
$Section = GetCurrentSection()
// Create a dialog box
$DialogBox = DialogBox_Create("Rename Section", "Set the new section name:")
// Add a text box to the dialog box
DialogBox_AddTextBox($DialogBox, "New Section Name:", "txtSectionName", "", true)
// Show the dialog box
DialogBox_Show($DialogBox)
// Get the value entered by the user
$NewName = $DialogBox.controls["txtSectionName"]
// Rename the section
$Section.name = $NewName
--code generated using Microsoft Copilot, slight human editing by Michael Steger
|
Download
|