// The path to the documents directory. string dataDir = RunExamples.GetDataDir_NoteBook(); Document document = new Document(); document.Save(dataDir + "CreatingPasswordProtectedDoc_out.one", new OneSaveOptions() { DocumentPassword = "pass" });