| Load Mode | Value | Description |
| SelectionNew | 0 | Replaces the current selection with a one loaded from a file. |
| SelectionAdd | 1 | Combines the loaded selection with a current one. |
| SelectionSubtract | 2 | Subtracts the loaded selection from a current one. |
Loading and Saving selection
var fdoc = new ActiveXObject("FileDocument.FileDocument");
var msel = fdoc.CreateEmptySelection();
msel.AddRange(100, 50); // selection: [100..150)
// create a file and obtain a stream object for it
msel.Save(stream);
msel.Clear(); // selection: empty
msel.AddRange(50, 50); // selection: [50..100)
// open a previously created selection file and obtain a stream object for it
msel.Load(stream,SelectionAdd); // selection: [50..150)