none
Send email from Outlook to Onenote with OnBttnOl.dll/Onenote Button RRS feed

  • Question

  • I tried for i while to send my mails from outlook to onenote.

    Is there a way to press the "Send to Onenote"-Button via VBA.

    I tried sendkeys already. But its not reliable enought.

    Is there a manual for OnBttnOl.dll perhaps?

    'Saves E-Mails to Onenote
    Sub SendEmailToOnenote()
    Dim outlookapp  As Application
    Set outlookapp = Application
    Dim outlookfolder As Folder
    Set outlookfolder = Application.ActiveExplorer.CurrentFolder
    
    outlookapp.ActiveExplorer.Activate
    outlookapp.ActiveExplorer.ClearSelection
    ActiveExplorer.SelectAllItems
    
    'here i want to press "Send to Onenote"
    
    'Sendkeys does not work
    SendKeys "%{R}"
    SendKeys "ÄN"
    SendKeys outlookfolder.name
    Sleep (1000)
    SendKeys "{ENTER}", True
    Sleep (1000)
    SendKeys "{ENTER}", True
    Sleep (1000)
    SendKeys "{ENTER}", True
    Sleep (1000)
    SendKeys "{ENTER}", True
    Sleep (1000)
    End Sub

    Thanks for your help.

    Monday, October 22, 2018 4:58 PM