下のサンプルは、ビューのアクションボタンを想定したものです。
Dim ws As New NotesUIWorkspace
Dim db As NotesDatabase
Dim dc As NotesDocumentCollection
Dim doc As NotesDocument
Dim newParent As NotesDocument
Set db = ws.CurrentDatabase.Database
Set doc = db.GetDocumentByID( ws.CurrentView.CaretNoteID )
Set dc = ws.PickListCollection( 3, False, db.Server, db.FilePath, ws.CurrentView.View.Name, "移動先選択", "新たに親とする文書を選択します。")
Set newParent = dc.GetFirstDocument
Call doc.MakeResponse( newParent )
Call doc.Save( True, False )
Call ws.ViewRefresh
ビューで選択されている文書を、新たに選択した文書の子文書にします。
サンプルでは単純にするためにエラー処理を省略しています。
また実際には「ビューで選択されている文書」と「新たに選択した文書」が同じ文書なら処理しない、とか「新たに選択した文書」に応じてフォーム名を変えたり、フィールドの過不足に対応するような処理がほしくなるかもしれません。