VBA for Outlook and OneNote: What Still Works

Illustrated infographic summarizing: VBA for Outlook And Onenote

By Greg Nowak. Last updated 2026-11-30.

You can still use VBA to automate classic Outlook for Windows or pull data from the OneNote desktop app into Excel. If your team has switched to new Outlook, the first question is what the macro did for the business. Filing one email in a notebook, routing every enquiry from a shared inbox, and collecting project notes for a weekly report each call for a different setup.

Which Outlook and OneNote automation should you use?

Start with the Outlook version your team actually runs. VBA and the Outlook Object Model are available in classic Outlook for Windows only. Both classic and new Outlook offer Send to OneNote, which may be all you need if people file messages by hand. Microsoft’s Outlook feature comparison

Choose an approach based on the job and what your team can maintain.
What you need to do Where to start What to check first
Save an occasional email to a notebook Send to OneNote The person filing the message can access the destination notebook.
Keep an existing Outlook macro running VBA in classic Outlook for Windows The team will keep classic Outlook and can run the macro under its Office policy.
Export OneNote data from an existing Excel workbook Excel VBA and the OneNote desktop COM interface The workbook can read a sample page on the Windows setup your team uses.
Turn incoming Microsoft 365 email into notebook pages Power Automate The flow connections can access the mailbox and the destination section.
Read cloud notebooks from a custom application Microsoft Graph The application can use delegated access through a user with notebook permissions.

How to pull OneNote data into Excel with VBA

For an existing Windows workbook, Excel runs the macro and calls the OneNote desktop app through its COM interface. If the workbook uses an early-bound reference, open Tools > References in the VBA editor and check that it points to the OneNote object library installed on that PC. Start with one notebook section and one page you can check by hand.

  1. Call GetHierarchy with the section ID and the hsPages scope to get the page list as XML. Use a namespace-aware XML parser to extract the page IDs and titles.
  2. Pass each selected page ID to GetPageContent to retrieve its content as XML. Use the same explicit schema version for both calls, such as xs2013, and match your parser to that namespace.
  3. Map the fields you need to an Excel table. Keep the page ID with each row so a rerun can update an existing entry. Put pages with missing or unexpected fields in a review list so someone can correct them.

For a weekly project report, try extracting just the page title, owner and next action. A consistent page template makes those fields easier to read reliably. Test one page with a missing owner and another with a pasted table before you rely on the export. Microsoft’s OneNote desktop Application interface reference

Use Power Automate for a shared inbox workflow

For a team that wants to turn selected messages into handover notes, start with the Office 365 Outlook trigger When a new email arrives in a shared mailbox (V2). Give the connection account access to the mailbox and use a narrow filter, such as a subject prefix, for the pilot. Microsoft documents that the trigger may skip protected or oversized messages, so test the messages your workflow is expected to handle and agree who checks the inbox for exceptions. Microsoft’s Office 365 Outlook connector reference

Then add the OneNote (Business) action Create page in a section. Choose the destination section and set the title in the page HTML with <title>. Include the fields people need for the handover, such as the subject, received date and reference number. Check who can read the destination notebook before copying message content. Record the source message ID so a colleague can check for an existing page before retrying a failed run. Microsoft’s OneNote (Business) connector reference

Check the sign-in model before building with Microsoft Graph

Microsoft Graph is an option when a custom application needs to work with cloud notebooks. A first read can start with GET https://graph.microsoft.com/v1.0/me/onenote/pages to list pages available to the signed-in user. The OneNote API requires delegated authentication, so test with an account that has the same access as the intended users. If the job must run solely under an application identity, pick a data store that supports app-only access before you commit to the design. Microsoft’s OneNote REST API overview

Pilot one workflow before rolling it out

Pick one mailbox or notebook section and write down what should happen, what counts as a successful run and who handles exceptions. Have the person who will own the workflow run the pilot and recover from a failed example. That gives you a concrete basis for deciding whether to keep a macro or rebuild it.

If you have a macro to replace or a manual handover to simplify, send Greg a short description of the workflow and the output your team needs. A sample with sensitive details removed is enough to start the conversation.

Related on GrN.dk

Need help with this kind of work?

Share your Outlook or OneNote workflow with Greg and discuss whether to keep the macro or move it to a cloud flow. Get in touch with Greg.

Sources

Latest articles

Let’s Encrypt moves to 64-day certificates on 10 February 2027. Check when each site renews, test the reload and verify the certificate visitors receive.

Work out which Drupal 10 sites can move to Drupal 11 by 9 December, who can resolve each blocker and how to test publishing and rollback before launch.

See how SharePoint access changes reach internal AI search, and test how long revoked content can still appear in results, generated answers, and citations.

At month-end, reconcile Shopify Payments against your bank statement and e-conomic. Use the payout ID to trace fees, refunds, and payouts that reach your bank the following month.

Trace an intermittent NGINX 502 through Cloudflare, upstream attempts, and application logs so you can see where the request failed and who should pick it up.

Find the apps, scripts and printers that still send mail through Microsoft 365 with a mailbox password, then test a replacement before the December 2026 change.

Find subscriptions and insurance expenses in e-conomic that should be spread over several months. See how AI reads the supporting documents and how your finance lead approves the proposed allocations.

Before relying on an AI project briefing, check which files it covered. A practical workflow for tracking documents, recording gaps and verifying key claims.

Check whether your contact form rejects missing or invalid Turnstile tokens, handles failed checks for genuine users and delivers accepted enquiries to your team.

Compare Bing citations, identifiable AI visits and verified enquiries to see which pages deserve attention before you increase your AI search marketing budget.