LinqToOneNote 2.0.0
dotnet add package LinqToOneNote --version 2.0.0
NuGet\Install-Package LinqToOneNote -Version 2.0.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="LinqToOneNote" Version="2.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="LinqToOneNote" Version="2.0.0" />
<PackageReference Include="LinqToOneNote" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add LinqToOneNote --version 2.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: LinqToOneNote, 2.0.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package LinqToOneNote@2.0.0
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=LinqToOneNote&version=2.0.0
#tool nuget:?package=LinqToOneNote&version=2.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
LINQ to OneNote
A helper library for dealing with the OneNote Interop API. Originally made for Flow.Launcher.Plugin.OneNote.
//Search pages that have "hello there" in the title or content.
var pages = OneNote.FindPages("hello there");
Page page = pages.FirstOrDefault();
if (page == null)
return;
Console.WriteLine(page.Name);
page.Open(); // or OneNote.Open(page)
var root = OneNote.GetFullHierarchy();
var items = root.Notebooks
.Descendants()
.Take(10);
foreach(var item in items)
{
Console.WriteLine("Item: " + item.Name + " | Parent:" + item.Parent?.Name);
}
View the documentation for more information and examples or visit the the API Reference to see the full API.
Most functions return an IEnumerable allowing for easy use with LINQ.
Features
- Search your OneNote pages. Optionally specify a notebook, section group or section to restrict the search to.
- Create OneNote items.
- Open items in OneNote.
- Rename items.
- Delete items.
- Traverse your whole OneNote hierarchy` with Linq To Tree-esque methods:
IOneNoteItem.ChildrenIOneNoteItem.Descendants()IOneNoteItem.Ancestors()IOneNoteItem.AfterSelf()IOneNoteItem.BeforeSelf()
- Query only a part of your OneNote hierarchy with methods in
OneNote.Partial. This is especially useful if you have a substantial amount of notes i.eOneNote.GetFullHierarchy()takes too long. - Interact with OneNote sections that are not in any Notebook →
Root.OpenSections
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0-windows7.0 is compatible. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net9.0-windows7.0
- Interop.Microsoft.Office.Interop.OneNote (>= 1.1.0.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.0.0 | 90 | 1/3/2026 |
See https://github.com/Odotocodot/LinqToOneNote/releases/latest for release notes.