Locate and install Problem


jro11

Well-known member
Member
Local time
10:55 PM
Posts
633
OS
Win11 Pro
I'm using Microsoft Office 365, Subscription Edition. To run a Visual Basic script that interacts with Outlook and OneNote, I need the following components installed and available in the VBA References:
  • Visual Basic for Applications
  • Microsoft Outlook 16.0 Object Library
  • OLE Automation
  • Microsoft Office 16.0 Object Library
  • Microsoft XML, v6.0
  • Microsoft Scripting Runtime
  • Microsoft OneNote 15.0 Object Library ✅ (required for OneNote automation via VBA)
1749126594770.webp

How can I locate and install the Microsoft OneNote 15.0 Object Library?

Thanks
 

My Computers

System One System Two

  • OS
    Win11 Pro
    Computer type
    PC/Desktop
    Manufacturer/Model
    Beelink
    Memory
    16GB
    Graphics Card(s)
    2.30 gigahertz Intel 11th Gen Core i7-11800H
    Sound Card
    Intel® Smart Sound Technology for USB Audio
    Monitor(s) Displays
    laptop (small) and 1 or 2 external monitors
    Screen Resolution
    -
    Hard Drives
    PC711 NVMe SK hynix 1TB 1.02 TB NVMe ANB2N582412102F0G_0001
    PSU
    -
    Case
    Laptop
    Cooling
    fan
    Keyboard
    External!
    Mouse
    External
    Internet Speed
    -
    Browser
    Chrome (Chrome profiles), Firefox (Bookmark Search Plus2), Edge (History page), Opera (annoying)
    Antivirus
    WinDefender
    Other Info
    Win11 Home 23H2 22631.3447
  • Operating System
    Win10
    Computer type
    PC/Desktop
    Manufacturer/Model
    self
    Motherboard
    Gigabyte B75M-D3H
    Memory
    8068 MB Usable Installed Memory
    Graphics card(s)
    2.30 gigahertz Intel 11th Gen Core i7-11800H
    Sound Card
    Intel® Smart Sound Technology for USB Audio
    Monitor(s) Displays
    3 Displays
    Screen Resolution
    n/a
    Hard Drives
    SSD and others (internal and external)
    Case
    Desktop
    Cooling
    Fan
    Mouse
    External
    Keyboard
    External
    Browser
    Chrome, Firefox, Tor, Brave, Opera, etc.
    Antivirus
    Win Defender
    Other Info
    Win10 & unfortunately OneDrive: Can't completely rid myself of this!!
Do you have OneNote installed?
 

My Computer

System One

  • OS
    WIN 11 Pro 24H2 - 26100.3323
    Computer type
    PC/Desktop
    Manufacturer/Model
    Custom Build
    CPU
    Intel XEON E5-2699 v3
    Motherboard
    ASUS X99-A
    Memory
    64GB Teamgroup UD4-3600
    Graphics Card(s)
    NVIDIA GeForce GTX 1080 Ti
    Sound Card
    Integrated
    Monitor(s) Displays
    ACER X34 Predator
    Screen Resolution
    3440 x 1440
    Hard Drives
    Crucial CT1000P 3P SSD8 1TB
    Crucial CT1000 BX500 SSD 1TB
    PSU
    GameMax Pro
    Case
    Fractal Design
    Cooling
    Corsair H110iGT + 6 140mm Fans
    Keyboard
    Corsair K4
    Mouse
    G-Skill G502
    Internet Speed
    50MBs
    Browser
    Chrome
    Antivirus
    OEM
Yes
 

My Computers

System One System Two

  • OS
    Win11 Pro
    Computer type
    PC/Desktop
    Manufacturer/Model
    Beelink
    Memory
    16GB
    Graphics Card(s)
    2.30 gigahertz Intel 11th Gen Core i7-11800H
    Sound Card
    Intel® Smart Sound Technology for USB Audio
    Monitor(s) Displays
    laptop (small) and 1 or 2 external monitors
    Screen Resolution
    -
    Hard Drives
    PC711 NVMe SK hynix 1TB 1.02 TB NVMe ANB2N582412102F0G_0001
    PSU
    -
    Case
    Laptop
    Cooling
    fan
    Keyboard
    External!
    Mouse
    External
    Internet Speed
    -
    Browser
    Chrome (Chrome profiles), Firefox (Bookmark Search Plus2), Edge (History page), Opera (annoying)
    Antivirus
    WinDefender
    Other Info
    Win11 Home 23H2 22631.3447
  • Operating System
    Win10
    Computer type
    PC/Desktop
    Manufacturer/Model
    self
    Motherboard
    Gigabyte B75M-D3H
    Memory
    8068 MB Usable Installed Memory
    Graphics card(s)
    2.30 gigahertz Intel 11th Gen Core i7-11800H
    Sound Card
    Intel® Smart Sound Technology for USB Audio
    Monitor(s) Displays
    3 Displays
    Screen Resolution
    n/a
    Hard Drives
    SSD and others (internal and external)
    Case
    Desktop
    Cooling
    Fan
    Mouse
    External
    Keyboard
    External
    Browser
    Chrome, Firefox, Tor, Brave, Opera, etc.
    Antivirus
    Win Defender
    Other Info
    Win10 & unfortunately OneDrive: Can't completely rid myself of this!!

My Computers

System One System Two

  • OS
    Win11 Pro
    Computer type
    PC/Desktop
    Manufacturer/Model
    Beelink
    Memory
    16GB
    Graphics Card(s)
    2.30 gigahertz Intel 11th Gen Core i7-11800H
    Sound Card
    Intel® Smart Sound Technology for USB Audio
    Monitor(s) Displays
    laptop (small) and 1 or 2 external monitors
    Screen Resolution
    -
    Hard Drives
    PC711 NVMe SK hynix 1TB 1.02 TB NVMe ANB2N582412102F0G_0001
    PSU
    -
    Case
    Laptop
    Cooling
    fan
    Keyboard
    External!
    Mouse
    External
    Internet Speed
    -
    Browser
    Chrome (Chrome profiles), Firefox (Bookmark Search Plus2), Edge (History page), Opera (annoying)
    Antivirus
    WinDefender
    Other Info
    Win11 Home 23H2 22631.3447
  • Operating System
    Win10
    Computer type
    PC/Desktop
    Manufacturer/Model
    self
    Motherboard
    Gigabyte B75M-D3H
    Memory
    8068 MB Usable Installed Memory
    Graphics card(s)
    2.30 gigahertz Intel 11th Gen Core i7-11800H
    Sound Card
    Intel® Smart Sound Technology for USB Audio
    Monitor(s) Displays
    3 Displays
    Screen Resolution
    n/a
    Hard Drives
    SSD and others (internal and external)
    Case
    Desktop
    Cooling
    Fan
    Mouse
    External
    Keyboard
    External
    Browser
    Chrome, Firefox, Tor, Brave, Opera, etc.
    Antivirus
    Win Defender
    Other Info
    Win10 & unfortunately OneDrive: Can't completely rid myself of this!!
The Microsoft OneNote 15.0 Object Library DLL file name is ONOTE15.DLL.

Locate it on your computer and use the [Browse] button on the References Dialog to select it.
 

My Computer

System One

  • OS
    Windows 10, Windows 11
    Computer type
    PC/Desktop
The Microsoft OneNote 15.0 Object Library DLL file name is ONOTE15.DLL.

Locate it on your computer
ONOTE15.DLL does not seem to be available. (the following are in alphabetical order)
1749170622323.webp
 

My Computers

System One System Two

  • OS
    Win11 Pro
    Computer type
    PC/Desktop
    Manufacturer/Model
    Beelink
    Memory
    16GB
    Graphics Card(s)
    2.30 gigahertz Intel 11th Gen Core i7-11800H
    Sound Card
    Intel® Smart Sound Technology for USB Audio
    Monitor(s) Displays
    laptop (small) and 1 or 2 external monitors
    Screen Resolution
    -
    Hard Drives
    PC711 NVMe SK hynix 1TB 1.02 TB NVMe ANB2N582412102F0G_0001
    PSU
    -
    Case
    Laptop
    Cooling
    fan
    Keyboard
    External!
    Mouse
    External
    Internet Speed
    -
    Browser
    Chrome (Chrome profiles), Firefox (Bookmark Search Plus2), Edge (History page), Opera (annoying)
    Antivirus
    WinDefender
    Other Info
    Win11 Home 23H2 22631.3447
  • Operating System
    Win10
    Computer type
    PC/Desktop
    Manufacturer/Model
    self
    Motherboard
    Gigabyte B75M-D3H
    Memory
    8068 MB Usable Installed Memory
    Graphics card(s)
    2.30 gigahertz Intel 11th Gen Core i7-11800H
    Sound Card
    Intel® Smart Sound Technology for USB Audio
    Monitor(s) Displays
    3 Displays
    Screen Resolution
    n/a
    Hard Drives
    SSD and others (internal and external)
    Case
    Desktop
    Cooling
    Fan
    Mouse
    External
    Keyboard
    External
    Browser
    Chrome, Firefox, Tor, Brave, Opera, etc.
    Antivirus
    Win Defender
    Other Info
    Win10 & unfortunately OneDrive: Can't completely rid myself of this!!
Locate it on your computer and use the [Browse] button on the References Dialog to select it.
Since, despite reinstalling Office 365 Subscription Edition multiple times, this dll doesn't seem to be on my computer. 1749225541379.webp, how, and from where, would you recommend I download the file? Is there a safe website from which it can be downloaded, one where I can confirm its validity using a checksum?
 

My Computers

System One System Two

  • OS
    Win11 Pro
    Computer type
    PC/Desktop
    Manufacturer/Model
    Beelink
    Memory
    16GB
    Graphics Card(s)
    2.30 gigahertz Intel 11th Gen Core i7-11800H
    Sound Card
    Intel® Smart Sound Technology for USB Audio
    Monitor(s) Displays
    laptop (small) and 1 or 2 external monitors
    Screen Resolution
    -
    Hard Drives
    PC711 NVMe SK hynix 1TB 1.02 TB NVMe ANB2N582412102F0G_0001
    PSU
    -
    Case
    Laptop
    Cooling
    fan
    Keyboard
    External!
    Mouse
    External
    Internet Speed
    -
    Browser
    Chrome (Chrome profiles), Firefox (Bookmark Search Plus2), Edge (History page), Opera (annoying)
    Antivirus
    WinDefender
    Other Info
    Win11 Home 23H2 22631.3447
  • Operating System
    Win10
    Computer type
    PC/Desktop
    Manufacturer/Model
    self
    Motherboard
    Gigabyte B75M-D3H
    Memory
    8068 MB Usable Installed Memory
    Graphics card(s)
    2.30 gigahertz Intel 11th Gen Core i7-11800H
    Sound Card
    Intel® Smart Sound Technology for USB Audio
    Monitor(s) Displays
    3 Displays
    Screen Resolution
    n/a
    Hard Drives
    SSD and others (internal and external)
    Case
    Desktop
    Cooling
    Fan
    Mouse
    External
    Keyboard
    External
    Browser
    Chrome, Firefox, Tor, Brave, Opera, etc.
    Antivirus
    Win Defender
    Other Info
    Win10 & unfortunately OneDrive: Can't completely rid myself of this!!
There's a document Add object libraries to your Visual Basic project - Microsoft Support that purports to describe how to how to access and add object libraries to a Visual Basic project. Unfortunately, it doesn’t use Outlook as the VBA ‘platform’ (it uses Excel) but the process should be the same.

After instructing: To add other object libraries to Available References, click Browse, and then find the object library that you want it shows a picture of the interface that isn’t showing up on my screen:
1749237204531.webp
This looks vaguely “Apple-OSlike”. What happens when I click Browse it simply sends me to C:\Windows\System32 where I see a list of folders—none labeled Microsoft OneNote 15.0 Object Library.
How do I get to a selection window that looks like the one pictured?
Then it says to
“Make the Developer tab visible
1. On the top bar, select Excel > Preferences > Ribbon & Toolbar.
2. Under Customize the Ribbon, select Main Tabs and then check Developer.
3. Click Save and then close Excel Preferences.”

I’m not sure what “the top bar” means, and I see no way to select Excel Outlook > Preferences > Ribbon & Toolbar in either the VB for applications window
1749236886751.webp
or the Outlook home screen
1749236932618.webp
Is there another way to go into Developer mode?
 
Last edited:

My Computers

System One System Two

  • OS
    Win11 Pro
    Computer type
    PC/Desktop
    Manufacturer/Model
    Beelink
    Memory
    16GB
    Graphics Card(s)
    2.30 gigahertz Intel 11th Gen Core i7-11800H
    Sound Card
    Intel® Smart Sound Technology for USB Audio
    Monitor(s) Displays
    laptop (small) and 1 or 2 external monitors
    Screen Resolution
    -
    Hard Drives
    PC711 NVMe SK hynix 1TB 1.02 TB NVMe ANB2N582412102F0G_0001
    PSU
    -
    Case
    Laptop
    Cooling
    fan
    Keyboard
    External!
    Mouse
    External
    Internet Speed
    -
    Browser
    Chrome (Chrome profiles), Firefox (Bookmark Search Plus2), Edge (History page), Opera (annoying)
    Antivirus
    WinDefender
    Other Info
    Win11 Home 23H2 22631.3447
  • Operating System
    Win10
    Computer type
    PC/Desktop
    Manufacturer/Model
    self
    Motherboard
    Gigabyte B75M-D3H
    Memory
    8068 MB Usable Installed Memory
    Graphics card(s)
    2.30 gigahertz Intel 11th Gen Core i7-11800H
    Sound Card
    Intel® Smart Sound Technology for USB Audio
    Monitor(s) Displays
    3 Displays
    Screen Resolution
    n/a
    Hard Drives
    SSD and others (internal and external)
    Case
    Desktop
    Cooling
    Fan
    Mouse
    External
    Keyboard
    External
    Browser
    Chrome, Firefox, Tor, Brave, Opera, etc.
    Antivirus
    Win Defender
    Other Info
    Win10 & unfortunately OneDrive: Can't completely rid myself of this!!
The Link you provided is for Outlook For Mac.

This one shows the Windows version of Add Reference.
How To Add Outlook Reference In Excel VBA, Easy Tutorial 2024

Process is the same for any Office App (Excel, Outlook).

I gave you the wrong file reference. For my Office 2010 it is to an EXE, not a DLL.
And the Display name is "Type Library" not Object Library"
Redirecting

1749239483436.webp
 

My Computer

System One

  • OS
    Windows 10, Windows 11
    Computer type
    PC/Desktop
The Link you provided is for Outlook For Mac.
Ergo my confusion. But it's still the only graphic provided in this Microsoft document showing how to Add object libraries to your Visual Basic project.
This one shows the Windows version of Add Reference.
How To Add Outlook Reference In Excel VBA, Easy Tutorial 2024
This document describes how to add references which is what I pictured in my first post in this thread. It doesn't cover how to Add object libraries to your Visual Basic project - Microsoft Support
I gave you the wrong file reference. For my Office 2010 it is to an EXE, not a DLL.
And the Display name is "Type Library" not Object Library"
Not for my purposes: Microsoft Outlook 16.0 Object Library Lets you automate Outlook (contacts, mail, calendar, etc.) and IS REQUIRED TO access Outlook data while Microsoft OneNote 14.0/15.0 Type Library ONLY lets you automate OneNote (pages, sections, notebooks).
I need the Object Library to run a VBA script that copies Outlook Contacts into OneNote.
 

My Computers

System One System Two

  • OS
    Win11 Pro
    Computer type
    PC/Desktop
    Manufacturer/Model
    Beelink
    Memory
    16GB
    Graphics Card(s)
    2.30 gigahertz Intel 11th Gen Core i7-11800H
    Sound Card
    Intel® Smart Sound Technology for USB Audio
    Monitor(s) Displays
    laptop (small) and 1 or 2 external monitors
    Screen Resolution
    -
    Hard Drives
    PC711 NVMe SK hynix 1TB 1.02 TB NVMe ANB2N582412102F0G_0001
    PSU
    -
    Case
    Laptop
    Cooling
    fan
    Keyboard
    External!
    Mouse
    External
    Internet Speed
    -
    Browser
    Chrome (Chrome profiles), Firefox (Bookmark Search Plus2), Edge (History page), Opera (annoying)
    Antivirus
    WinDefender
    Other Info
    Win11 Home 23H2 22631.3447
  • Operating System
    Win10
    Computer type
    PC/Desktop
    Manufacturer/Model
    self
    Motherboard
    Gigabyte B75M-D3H
    Memory
    8068 MB Usable Installed Memory
    Graphics card(s)
    2.30 gigahertz Intel 11th Gen Core i7-11800H
    Sound Card
    Intel® Smart Sound Technology for USB Audio
    Monitor(s) Displays
    3 Displays
    Screen Resolution
    n/a
    Hard Drives
    SSD and others (internal and external)
    Case
    Desktop
    Cooling
    Fan
    Mouse
    External
    Keyboard
    External
    Browser
    Chrome, Firefox, Tor, Brave, Opera, etc.
    Antivirus
    Win Defender
    Other Info
    Win10 & unfortunately OneDrive: Can't completely rid myself of this!!
Could you please provide a link to the VBA script you are trying to implement? In your previous post "copies Outlook Contacts into OneNote" is underlined, but it does not work as a link for me (use the "Insert Link" button in the forum reply toolbar or Ctrl+K).

Or insert the VBA code in your reply using he forum reply toolbar "Code </>" button.
 

My Computer

System One

  • OS
    Windows 10, Windows 11
    Computer type
    PC/Desktop
Could you please provide a link to the VBA script you are trying to implement? In your previous post "copies Outlook Contacts into OneNote" is underlined, but it does not work as a link for me
If you mean the text "I need the Object Library to run a VBA script that copies Outlook Contacts into OneNote", that isn't a link--it's just underlined text. (Because my post #X is fairly detailed I took care to color the link so it appeared as in Windows. I should have done this for all the post's active links. Sorry.)
Or insert the VBA code in your reply
More about 'why' the Outlook-to-OneNote transfer is so important
My Outlook Contacts Notes field depends completely on the text appearing the way I formatted it in Outlook. Because OneNote’s API doesn’t accept raw RTF—but does accept HTML, this routine transfers the formatted Notes content BodyFormat as HTML.
More about 'why' go the VBA route
Before going the VBA route, to prove to myself this could be done I manually cut-and-pasted each of the Outlook Contact fields into their corresponding OneNote field. I was thrilled to find I could cut/paste fully formatted (RTF-like) information from the Contact Notes field into the corresponding OneNote Notes field.

I might have used the manual cut/paste approach if I only had a couple hundred Contacts but doing 1700 seemed a bit daunting.


Sub SendAllContactsToOneNote()
Dim olApp As Outlook.Application
Dim olNamespace As Outlook.Namespace
Dim olFolder As Outlook.Folder
Dim olContact As Outlook.ContactItem
Dim oneNoteApp As OneNote.Application
Dim sectionID As String
Dim contactHTML As String
Dim contactName As String
Dim notesFormatted As String
Dim i As Long

' Initialize Outlook
Set olApp = Outlook.Application
Set olNamespace = olApp.GetNamespace("MAPI")
Set olFolder = olNamespace.GetDefaultFolder(olFolderContacts)

' Initialize OneNote
Set oneNoteApp = New OneNote.Application
sectionID = GetSectionID(oneNoteApp, "Contact_OneNote", "VBA transfer")
If sectionID = "" Then
MsgBox "Target OneNote section not found.", vbCritical
Exit Sub
End If

' Loop through all items in Contacts
For i = 1 To olFolder.Items.Count
If TypeOf olFolder.Items(i) Is Outlook.ContactItem Then
Set olContact = olFolder.Items(i)
contactName = olContact.FullName

' Get Notes (HTML preferred)
If olContact.BodyFormat = olFormatHTML Then
notesFormatted = olContact.HTMLBody
Else
notesFormatted = "<pre>" & olContact.Body & "</pre>"
End If

' Build HTML
contactHTML = "<html><head><title>" & contactName & "</title></head><body>" & _
"<h1>" & contactName & "</h1>" & _
"<p><b>Company:</b> " & olContact.CompanyName & "<br>" & _
"<b>Email:</b> " & olContact.Email1Address & "<br>" & _
"<b>Phone:</b> " & olContact.BusinessTelephoneNumber & "<br>" & _
"<b>Mobile:</b> " & olContact.MobileTelephoneNumber & "<br>" & _
"<b>Address:</b> " & olContact.MailingAddress & "</p>" & _
"<hr><h3>Notes</h3>" & notesFormatted & _
"</body></html>"

' Create OneNote Page
Dim pageID As String
oneNoteApp.CreateNewPage sectionID, pageID, npsDefault
oneNoteApp.UpdatePageContent "<one:Page xmlns:one='http://schemas.microsoft.com/office/onenote/2013/onenote' ID='" & pageID & "'>" & _
"<one:Outline><one:OEChildren>" & _
"<one:OE><one:HTMLBlock><![CDATA[" & contactHTML & "]]></one:HTMLBlock></one:OE>" & _
"</one:OEChildren></one:Outline></one:Page>"
End If
Next i

MsgBox "All Outlook contacts sent to OneNote.", vbInformation
End Sub

The following supporting function GetSectionID() is essential because it finds the unique internal ID of the OneNote section where you want to send the contact(s). OneNote doesn't let you create or update pages by just using the section name — it requires a section ID, which looks something like this: {D5E8F0D0-2F0E-4977-9CB9-C0143D2D0A9F}{1}{B0}

More specifically: Function GetSectionID
• Looks for the specified notebook and section by name.
• If the section doesn't exist, it creates it inside the target notebook.
• Returns the resulting section ID (whether found or created).

Function GetSectionID(oneNoteApp As OneNote.Application, notebookName As String, sectionName As String) As String
Dim xml As String
oneNoteApp.GetHierarchy "", hsSections, xml

Dim doc As Object
Set doc = CreateObject("MSXML2.DOMDocument.6.0")
doc.LoadXML xml

Dim nsMgr As Object
Set nsMgr = CreateObject("MSXML2.DOMDocument").createNamespaceManager(doc)
nsMgr.AddNamespace "one", http://schemas.microsoft.com/office/onenote/2013/onenote

Dim notebookNode As Object
Set notebookNode = Nothing

Dim node As Object
For Each node In doc.SelectNodes("//one:Notebook")
If node.Attributes.getNamedItem("name").Text = notebookName Then
Set notebookNode = node
Exit For
End If
Next

If notebookNode Is Nothing Then
MsgBox "Notebook '" & notebookName & "' not found.", vbCritical
GetSectionID = ""
Exit Function
End If

' Look for the section within the notebook
For Each node In notebookNode.ChildNodes
If node.BaseName = "Section" Then
If node.Attributes.getNamedItem("name").Text = sectionName Then
GetSectionID = node.Attributes.getNamedItem("ID").Text
Exit Function
End If
End If
Next

' Section not found – create it
Dim newSectionID As String
oneNoteApp.CreateNewSection notebookNode.Attributes.getNamedItem("ID").Text, sectionName, newSectionID
GetSectionID = newSectionID
End Function

Thanks greatly.
 

My Computers

System One System Two

  • OS
    Win11 Pro
    Computer type
    PC/Desktop
    Manufacturer/Model
    Beelink
    Memory
    16GB
    Graphics Card(s)
    2.30 gigahertz Intel 11th Gen Core i7-11800H
    Sound Card
    Intel® Smart Sound Technology for USB Audio
    Monitor(s) Displays
    laptop (small) and 1 or 2 external monitors
    Screen Resolution
    -
    Hard Drives
    PC711 NVMe SK hynix 1TB 1.02 TB NVMe ANB2N582412102F0G_0001
    PSU
    -
    Case
    Laptop
    Cooling
    fan
    Keyboard
    External!
    Mouse
    External
    Internet Speed
    -
    Browser
    Chrome (Chrome profiles), Firefox (Bookmark Search Plus2), Edge (History page), Opera (annoying)
    Antivirus
    WinDefender
    Other Info
    Win11 Home 23H2 22631.3447
  • Operating System
    Win10
    Computer type
    PC/Desktop
    Manufacturer/Model
    self
    Motherboard
    Gigabyte B75M-D3H
    Memory
    8068 MB Usable Installed Memory
    Graphics card(s)
    2.30 gigahertz Intel 11th Gen Core i7-11800H
    Sound Card
    Intel® Smart Sound Technology for USB Audio
    Monitor(s) Displays
    3 Displays
    Screen Resolution
    n/a
    Hard Drives
    SSD and others (internal and external)
    Case
    Desktop
    Cooling
    Fan
    Mouse
    External
    Keyboard
    External
    Browser
    Chrome, Firefox, Tor, Brave, Opera, etc.
    Antivirus
    Win Defender
    Other Info
    Win10 & unfortunately OneDrive: Can't completely rid myself of this!!
I am sorry, but I don't have any experience using VBA to manipulate the OneNote object model, so I can't offer any specific advice.

In general:

Since you are using "Late Binding" (i.e. CreateObject) then there is no need for any VBA References to be added to your project. At runtime, the object either has the property/method you invoked or you'll get an error. References are normally only needed when doing "Early Binding".
Early and Late Binding - Visual Basic

If I add a reference to the "Microsoft OneNote 14.0 Type Library", located at "C:\Program Files (x86)\Microsoft Office\Office14\ONENOTE.EXE\3"
Then [OK] the References dialog, and reopen it, it now shows as "... Object Library".

If I then examine this Library using the VBA Object Browser (F2) it seems to have all the properties/methods needed to manipulate a OneNote Application and it's objects.

1749262550773.webp

1749262818628.webp

That is about as far as I can follow you on this project.
 

My Computer

System One

  • OS
    Windows 10, Windows 11
    Computer type
    PC/Desktop
That is about as far as I can follow you on this project.
Thank you. A hundred kudo's for you (though I can only hit the 'multi-like' button once)

Because of what you posted I've been able to activate all the required "References" ChatGPT reported were necessary to run the VBA routine that exports (just the first 7) Outlook contacts into separate OneNote pages.

I understand programming. It seems you understand the loopholes one need to navigate to get programs to work. (does this mean you're an IT expert? and OS expert? a (dare I say it) Microsoft specialist??)

Regardless...see next post
 

My Computers

System One System Two

  • OS
    Win11 Pro
    Computer type
    PC/Desktop
    Manufacturer/Model
    Beelink
    Memory
    16GB
    Graphics Card(s)
    2.30 gigahertz Intel 11th Gen Core i7-11800H
    Sound Card
    Intel® Smart Sound Technology for USB Audio
    Monitor(s) Displays
    laptop (small) and 1 or 2 external monitors
    Screen Resolution
    -
    Hard Drives
    PC711 NVMe SK hynix 1TB 1.02 TB NVMe ANB2N582412102F0G_0001
    PSU
    -
    Case
    Laptop
    Cooling
    fan
    Keyboard
    External!
    Mouse
    External
    Internet Speed
    -
    Browser
    Chrome (Chrome profiles), Firefox (Bookmark Search Plus2), Edge (History page), Opera (annoying)
    Antivirus
    WinDefender
    Other Info
    Win11 Home 23H2 22631.3447
  • Operating System
    Win10
    Computer type
    PC/Desktop
    Manufacturer/Model
    self
    Motherboard
    Gigabyte B75M-D3H
    Memory
    8068 MB Usable Installed Memory
    Graphics card(s)
    2.30 gigahertz Intel 11th Gen Core i7-11800H
    Sound Card
    Intel® Smart Sound Technology for USB Audio
    Monitor(s) Displays
    3 Displays
    Screen Resolution
    n/a
    Hard Drives
    SSD and others (internal and external)
    Case
    Desktop
    Cooling
    Fan
    Mouse
    External
    Keyboard
    External
    Browser
    Chrome, Firefox, Tor, Brave, Opera, etc.
    Antivirus
    Win Defender
    Other Info
    Win10 & unfortunately OneDrive: Can't completely rid myself of this!!
Just so I can say “I waz ear in ‘25”
 

My Computers

System One System Two

  • OS
    Windows 11 Pro 23H2 Build 22631.5335
    Computer type
    PC/Desktop
    Manufacturer/Model
    Sin-built
    CPU
    Intel(R) Core(TM) i7-4770K CPU @ 3.50GHz (4th Gen?)
    Motherboard
    ASUS ROG Maximus VI Formula
    Memory
    32.0 GB of I forget and the box is in storage.
    Graphics Card(s)
    Gigabyte nVidia GeForce GTX 1660 Super OC 6GB
    Sound Card
    Onboard
    Monitor(s) Displays
    5 x LG 25MS500-B - 1 x 24MK430H-B - 1 x Wacom Pro 22" Tablet
    Screen Resolution
    All over the place
    Hard Drives
    Too many to list.
    OS on Samsung 1TB 870 QVO SATA
    PSU
    Silverstone 1500
    Case
    NZXT Phantom 820 Full-Tower Case
    Cooling
    Noctua NH-D15 Elite Class Dual Tower CPU Cooler / 6 x EziDIY 120mm / 2 x Corsair 140mm somethings / 1 x 140mm Thermaltake something / 2 x 200mm Corsair.
    Keyboard
    Corsair K95 / Logitech diNovo Edge Wireless
    Mouse
    Logitech: G402 / G502 / Mx Masters / MX Air Cordless
    Internet Speed
    1000/400Mbps
    Browser
    All sorts
    Antivirus
    Kaspersky Premium
    Other Info
    I’m on a horse.
  • Operating System
    Windows 11 Pro 23H2 Build: 22631.4249
    Computer type
    Laptop
    Manufacturer/Model
    LENOVO Yoga 7i EVO OLED 14" Touchscreen i5 12 Core 16GB/512GB
    CPU
    Intel Core 12th Gen i5-1240P Processor (1.7 - 4.4GHz)
    Memory
    16GB LPDDR5 RAM
    Graphics card(s)
    Intel Iris Xe Graphics Processor
    Sound Card
    Optimized with Dolby Atmos®
    Screen Resolution
    QHD 2880 x 1800 OLED
    Hard Drives
    M.2 512GB
    Antivirus
    Defender / Malwarebytes
    Other Info
    …still on a horse.
The problem I am experiencing is not a programming problem. It seems to purely be a matter of permissions and the like related to Outlook, OneNote, (Microsoft Win11 Pro??, various APIs?, etc?)

I am now employing ChatGPT to generate the VB code. I report the errors I encounter and it responds with explanations and fixes for those problems--it even inserts them into the code. They include reports like "(my) XML document uses a namespace prefix (one:), but it's not declared in your MSXML2.DOMDocument. The XPath engine in MSXML2.DOMDocument.6.0" or "something to do with (my) XPath engine" or it blames the "VBA environment doesn't recognize OneNote.Application, which happens if the OneNote Object Library is missing or not referenced" or it decides to try "Late Binding" or "the OneNote COM type library is either missing, corrupted, or mismatched, even though you're using late binding"
at which it might suggest I re-register one thing or another, and eventually comes back to blaming either Outlook [and a possible mismatched install without the proper CAM registration], OneNote [its version], the Microsoft Store app,

But here's thekicker: before, during, and after I've, at its checked, repaired, and/or reinstaledl each of these programs it tells me I have the correct everything! It's as if there are a thousand ways to perform the fix and not a single way for the fix to have been performed. The number of suggested "Solutions" is endless...

AND ALL I'M TRYING TO DO IS AUTOMATE WHAT IS BASICALLY A SIMPLE CUT/PASTE OPERATION (and execute it 1700 TIMES or even just 7 times for good measure).

And I can't get Microsoft Office tech support to address the problem because they can't go any deeper than just reinstall Microsoft Office 365, Subscription Edition

(after having spent easily over 20 hours) I have no idea who or what kind of person to contact or hire to address this problem.
 

My Computers

System One System Two

  • OS
    Win11 Pro
    Computer type
    PC/Desktop
    Manufacturer/Model
    Beelink
    Memory
    16GB
    Graphics Card(s)
    2.30 gigahertz Intel 11th Gen Core i7-11800H
    Sound Card
    Intel® Smart Sound Technology for USB Audio
    Monitor(s) Displays
    laptop (small) and 1 or 2 external monitors
    Screen Resolution
    -
    Hard Drives
    PC711 NVMe SK hynix 1TB 1.02 TB NVMe ANB2N582412102F0G_0001
    PSU
    -
    Case
    Laptop
    Cooling
    fan
    Keyboard
    External!
    Mouse
    External
    Internet Speed
    -
    Browser
    Chrome (Chrome profiles), Firefox (Bookmark Search Plus2), Edge (History page), Opera (annoying)
    Antivirus
    WinDefender
    Other Info
    Win11 Home 23H2 22631.3447
  • Operating System
    Win10
    Computer type
    PC/Desktop
    Manufacturer/Model
    self
    Motherboard
    Gigabyte B75M-D3H
    Memory
    8068 MB Usable Installed Memory
    Graphics card(s)
    2.30 gigahertz Intel 11th Gen Core i7-11800H
    Sound Card
    Intel® Smart Sound Technology for USB Audio
    Monitor(s) Displays
    3 Displays
    Screen Resolution
    n/a
    Hard Drives
    SSD and others (internal and external)
    Case
    Desktop
    Cooling
    Fan
    Mouse
    External
    Keyboard
    External
    Browser
    Chrome, Firefox, Tor, Brave, Opera, etc.
    Antivirus
    Win Defender
    Other Info
    Win10 & unfortunately OneDrive: Can't completely rid myself of this!!

My Computers

System One System Two

  • OS
    Win11 Pro
    Computer type
    PC/Desktop
    Manufacturer/Model
    Beelink
    Memory
    16GB
    Graphics Card(s)
    2.30 gigahertz Intel 11th Gen Core i7-11800H
    Sound Card
    Intel® Smart Sound Technology for USB Audio
    Monitor(s) Displays
    laptop (small) and 1 or 2 external monitors
    Screen Resolution
    -
    Hard Drives
    PC711 NVMe SK hynix 1TB 1.02 TB NVMe ANB2N582412102F0G_0001
    PSU
    -
    Case
    Laptop
    Cooling
    fan
    Keyboard
    External!
    Mouse
    External
    Internet Speed
    -
    Browser
    Chrome (Chrome profiles), Firefox (Bookmark Search Plus2), Edge (History page), Opera (annoying)
    Antivirus
    WinDefender
    Other Info
    Win11 Home 23H2 22631.3447
  • Operating System
    Win10
    Computer type
    PC/Desktop
    Manufacturer/Model
    self
    Motherboard
    Gigabyte B75M-D3H
    Memory
    8068 MB Usable Installed Memory
    Graphics card(s)
    2.30 gigahertz Intel 11th Gen Core i7-11800H
    Sound Card
    Intel® Smart Sound Technology for USB Audio
    Monitor(s) Displays
    3 Displays
    Screen Resolution
    n/a
    Hard Drives
    SSD and others (internal and external)
    Case
    Desktop
    Cooling
    Fan
    Mouse
    External
    Keyboard
    External
    Browser
    Chrome, Firefox, Tor, Brave, Opera, etc.
    Antivirus
    Win Defender
    Other Info
    Win10 & unfortunately OneDrive: Can't completely rid myself of this!!
What took you so long to show up. (p.s. I'm now addicted to shandy's.)

Linda didn’t want to say anything as she wasn’t sure if I was OK with it.

Currently facing the possibility of losing toes or a foot.
Just got out of hospital. Have a vascular surgery in a couple of weeks that could dictate what happens if they can’t use stents in the arteries in my legs to clear the blockages.
They rushed me to hospital last Thursday and I was told, and was fully prepared to come home again with some missing appendages

Purely self inflicted due to haveing smoked for the last 48 years. I am OK with taking the responsibility for my actions, however inconvenient.
 

My Computers

System One System Two

  • OS
    Windows 11 Pro 23H2 Build 22631.5335
    Computer type
    PC/Desktop
    Manufacturer/Model
    Sin-built
    CPU
    Intel(R) Core(TM) i7-4770K CPU @ 3.50GHz (4th Gen?)
    Motherboard
    ASUS ROG Maximus VI Formula
    Memory
    32.0 GB of I forget and the box is in storage.
    Graphics Card(s)
    Gigabyte nVidia GeForce GTX 1660 Super OC 6GB
    Sound Card
    Onboard
    Monitor(s) Displays
    5 x LG 25MS500-B - 1 x 24MK430H-B - 1 x Wacom Pro 22" Tablet
    Screen Resolution
    All over the place
    Hard Drives
    Too many to list.
    OS on Samsung 1TB 870 QVO SATA
    PSU
    Silverstone 1500
    Case
    NZXT Phantom 820 Full-Tower Case
    Cooling
    Noctua NH-D15 Elite Class Dual Tower CPU Cooler / 6 x EziDIY 120mm / 2 x Corsair 140mm somethings / 1 x 140mm Thermaltake something / 2 x 200mm Corsair.
    Keyboard
    Corsair K95 / Logitech diNovo Edge Wireless
    Mouse
    Logitech: G402 / G502 / Mx Masters / MX Air Cordless
    Internet Speed
    1000/400Mbps
    Browser
    All sorts
    Antivirus
    Kaspersky Premium
    Other Info
    I’m on a horse.
  • Operating System
    Windows 11 Pro 23H2 Build: 22631.4249
    Computer type
    Laptop
    Manufacturer/Model
    LENOVO Yoga 7i EVO OLED 14" Touchscreen i5 12 Core 16GB/512GB
    CPU
    Intel Core 12th Gen i5-1240P Processor (1.7 - 4.4GHz)
    Memory
    16GB LPDDR5 RAM
    Graphics card(s)
    Intel Iris Xe Graphics Processor
    Sound Card
    Optimized with Dolby Atmos®
    Screen Resolution
    QHD 2880 x 1800 OLED
    Hard Drives
    M.2 512GB
    Antivirus
    Defender / Malwarebytes
    Other Info
    …still on a horse.
Wow - all very difficult stuff -- wishing you the best outcome. (y)
 

My Computer

System One

  • OS
    11
    Computer type
    Laptop
    Manufacturer/Model
    Lenovo Ideapad
    CPU
    13th Gen Intel(R) Core(TM) i5-1335U 1.30 GHz
    Memory
    8 gb
    Screen Resolution
    1900x1200
    Hard Drives
    500 gb ssd

Latest Support Threads

Back
Top Bottom