Qoder993 downloadsEmbed and edit OneNote notes directly in Obsidian via local COM integration — real window embedding, sidebar browsing, and interactive page selection.
Embed and edit OneNote notes directly inside Obsidian through a local COM interface with the OneNote desktop application. No cloud services, no Azure configuration required.
Windows only — this plugin relies on the Win32 OneNote desktop COM API and native window embedding. macOS support is limited to basic sidebar browsing via AppleScript.
Search for OneNote Integration in the Community Plugins browser inside Obsidian and click Install.
main.js, manifest.json, and styles.css from the latest release<vault>/.obsidian/plugins/onenote-integration/Note: On first launch the plugin automatically downloads the two helper executables (
onenote-repos.exe,win-embed-overlay.exe) from the GitHub release. No manual compilation is required.
Click the book icon in the left ribbon, or run Open OneNote view from the command palette.
Place your cursor where you want the embed and run Insert OneNote embed block, or create a code block manually:
```onenote
```
An interactive selector appears — choose a notebook, section, and page, then click Load Page. The live OneNote window will be embedded into your note.
If you already know the page ID:
```onenote
{12345678-ABCD-1234-ABCD-1234567890AB}
My Page Title
```
You can also paste a OneNote URL (the plugin extracts the id or page-id parameter):
```onenote
https://onedrive.live.com/...?id={page-id}
```
| Command | Description |
|---|---|
| Open OneNote view | Open the sidebar panel to browse notebooks |
| Insert OneNote embed block | Insert an onenote code block at the cursor |
| Detach OneNote window | Detach the current embed into a standalone window |
| Quit OneNote | Close the OneNote desktop application |
| Setting | Default | Description |
|---|---|---|
| Default Notebook | (empty) | Notebook name to open by default |
| Embed Aspect Ratio | 0.67 | Height-to-width ratio of the embed area (0.3 – 2.0). Reopen the note after changing. |
The plugin communicates with the OneNote desktop application through the Windows COM interface. Core operations (navigation, page content retrieval, hierarchy queries) are executed via PowerShell scripts and native C helper programs. macOS provides basic support through AppleScript.
Rather than using iframes or screenshots, the plugin repositions the actual OneNote window onto the code block using a native C overlay:
win-embed-overlay.exe creates a borderless WS_POPUP overlay window composited by DWM for correct z-ordering with Obsidian. It receives real-time coordinate updates over stdin.CoordinateTracker tracks the code block's screen-absolute position using four strategies: ResizeObserver, scroll listeners, MutationObserver, and rAF polling.| Program | Purpose |
|---|---|
onenote-repos.exe |
COM operations: navigate to pages, get URLs, find/show windows, quit OneNote |
win-embed-overlay.exe |
Window embedding: create overlay, reparent/position-only modes, stdin command loop |
Both are compiled as standalone single-file executables with no external runtime dependencies.
npm install
npm run build # TypeScript check + esbuild production build
npm run dev # Watch mode for development
npm test # Run tests (vitest)
C helpers are cross-compiled by the CI workflow (MinGW-w64 on Ubuntu). To compile locally:
# MinGW-w64
x86_64-w64-mingw32-gcc -O2 -static repos.c \
-luser32 -lole32 -loleaut32 -ldwmapi -lpsapi -lshell32 -lshcore -luuid \
-o onenote-repos.exe
x86_64-w64-mingw32-gcc -O2 -static win-embed-overlay.c \
-luser32 -lpsapi -ldwmapi -lshcore -o win-embed-overlay.exe
Use npm run build:test to build and copy all artifacts to a sibling test-vault directory.
Publishing is handled by GitHub Actions. The workflow does the following on every version tag:
manifest.json and package.jsonversions.json contains the current plugin versiononenote-repos.exe and win-embed-overlay.exe with MinGW-w64Release a new version with:
# 1. Update versions in manifest.json, package.json, and versions.json
git add manifest.json package.json versions.json
git commit -m "Release v1.3.2"
git push origin master
# 2. Push a matching version tag
git tag v1.3.2
git push origin v1.3.2
The generated release uploads:
main.jsmanifest.jsonstyles.cssversions.jsononenote-repos.exewin-embed-overlay.exeMIT