Move Method Example

This example includes code for both types of syntax.

Syntax 1: The following statement moves a file from one position in the file structure to another .

myFile.Move("C:\My Documents\My Webs\Adventure Works\Images", _
    True, False)

Syntax 2: The following example moves a node from the fifth position in the navigation structure to the fourth position in the navigation structure by designating the third node as the new left sibling.

Private Sub MoveNavNode()
Dim myNodes As NavigationNodes
Dim myNode As NavigationNode

Set myNodes = ActiveWeb.RootNavigationNode.Children
Set myNode = myNodes(4)

myNode.Move(myNodes, myNodes(2))
ActiveWeb.ApplyNavigationStructure
End Sub