Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Cmdlet

Move-OfficeNotebookCell

Module
PSWriteOffice
Inputs
OfficeIMO.Notebook.NotebookDocument
Outputs
OfficeIMO.Notebook.NotebookDocument

Moves a cell within a live notebook while keeping its identity and saved content.

Syntax

Move-OfficeNotebookCell
[-DestinationIndex] <Int32>
-Document <NotebookDocument>
[-Index] <Int32>
[-PassThru]
[<CommonParameters>]
#
Parameter set: All Parameter Sets

Examples

Move the third cell to the beginning.

$notebook | Move-OfficeNotebookCell -Index 2 -DestinationIndex 0

Parameters

-DestinationIndex Int32 requiredposition: 1
Zero-based final cell position.
-Document NotebookDocument requiredpipeline: True (ByValue)
Live notebook containing the cell.
-Index Int32 requiredposition: 0
Original zero-based cell position.
-PassThru SwitchParameter optional
Return the updated document.

Common Parameters

This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.

For more information, see about_CommonParameters.