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

Seneste artikler

Afstem Shopify Payments mod banken og e-conomic ved månedsluk. Brug udbetalings-ID’et til at spore gebyrer, refusioner og beløb, der lander efter månedsskiftet.

Find abonnementer og forsikringer i e-conomic, der skal fordeles over flere måneder. Se, hvordan AI læser bilagene, og økonomiansvarlige godkender forslagene.

Teamtailor udfaser Riminder den 21. november 2026. Tjek parservalg, kontaktfelter og integrationer, og få styr på sletning af ansøgerdata.

En sendt faktura er ikke nødvendigvis nået frem. Få styr på leveringsstatus, systemkravene i 2027 og afgrænset AI-hjælp til fejl og opfølgning i økonomiafdelingen.

Rækker jeres ChatGPT-licens til weboversættelser? Få overblik over API-kreditter, adgang og en WordPress-proces fra godkendt dansk tekst til oversættelseskladder.

Få styr på manglende bilag med et afgrænset AI-flow, der sorterer svar, koordinerer påmindelser og giver bogholderen en overskuelig liste til opfølgning.

Lad AI skrive kampagneudkast til Black Friday ud fra godkendte produktdata. Få styr på priser, modtagere og godkendelse, før Mailchimp-kladden bliver sendt.

Få tilbudsmails fra Outlook ind i CRM med AI. Afklar felter, dubletter og sælgeransvar, og mål i en pilot, om løsningen sparer tid og får flere forespørgsler fulgt op.

Gør månedsrapporten lettere at gentage med AI til Excel, Python og faste kontroller. Få styr på import, fejllister og afstemning, så tallene kan efterprøves.

Få godkendte timer fra Clockify med på fakturakladder i Dinero. AI skriver ydelsesbeskrivelser, mens faste regler styrer beløb, godkendelse og genkørsler.