Hi, I know this is an old thread but I found that if you check the box on the pop up window that says "Always send e-mail notes to the selected location" then it won't ask where to send the email, it'll just cycle through them. I'm sure there's a faster way, but that worked for me. You just have to remember to go into settings and un-check that box after you're done, unless you want to continue sending everything to the same place.
Using VBA to access 'SendToOneNote' Outlook Addin Command
Paul B
1
Reputation point
Would like to use Excel to control Outlook via VBA (which I can do).
The part I cannot do is after selecting all contents of an Outlook folder, access the 'Send to One Note' button in Outlook.
Attached are some screen shots, and below is some helpful code provided, however it goes through the selected items in a folder one by one (as objects). I would like to send the lot all at once.
Anyone know how to modify the code below, so that all selected items in an Outlook folder will move to a chosen OneNote location.
Private Sub OutlookMacroSample()
Dim olApp As New Outlook.Application
Dim olNS As Outlook.Namespace
Set olNS = olApp.GetNamespace("MAPI")
olApp.ActiveExplorer.Display
Dim itm As Object
Const CtrlId As String = "MoveToOneNote"
For Each itm In olApp.ActiveExplorer.Selection
With itm.GetInspector
.Display
If .CommandBars.GetEnabledMso(CtrlId) Then .CommandBars.ExecuteMso CtrlId
.Close olDiscard
End With
Next
End Sub