How to disable insertion of cover image and title when pasting YouTube video URL in OneNote

OneNote loves YouTube too much!
OneNote loves YouTube too much!

Disclaimer This entry contains undocumented, thus unsupported, artefact of Office. Any tricks in this entry might not work in a future version of Office, and its use might lead to unexpected or hidden problems in Office components even in the current version. Proceed with caution and assume full responsibility for your choice. Also, OneNote logo is a registered trademark of Microsoft (or its affiliates) in certain regions, and YouTube logo is a registered trademark of Google (or its affiliates) in certain regions.

When you paste a URL of a YouTube video into OneNote, the cover image and the title are fetched by OneNote, the text of the link becomes the title, and an online video object (with the cover image) is inserted following the link. Osk wanted to know (link in Chinese) how to disable this feature, because YouTube is blocked in China Mainland and this makes OneNote stop responding for several seconds before giving up the insertion of the video object. He also notices that the title is nevertheless fetched.

The feature isn’t configurable via the graphical user interface of OneNote. What’s worse is that OneNote seems to be making the web requests synchronously (on the UI thread).

There are two threads on Microsoft Answers, neither of which got useful responses (and both of which got the usual response).

Enter procmon.exe. It is fairly easy to see that OneNote 2016 consults the value named DisableAuthorWidget at HKCU\Software\Microsoft\Office\16.0\OneNote\Options\Other immediately before making the first TCP operation to an IP-address-identified server. Further investigation showed that the server is owned by Microsoft, thus the title can always be fetched even in Mainland China. OneNote then makes another request to a different server, this time domain-identified, which points to Google. That’s the cover image part. Setting DisableAuthorWidget to DWORD value 1 doesn’t prevent the automatic ‘prettification’, so look at earlier events. It turned out that there are 2 controlling registry entries:

  • If DisableExtraPathChecks at HKCU\Software\Microsoft\Office\16.0\Common\Security is DWORD 1, OneNote will not pull the title nor the cover image.
  • If BlockHTTPImages at HKCU\Software\Microsoft\Office\16.0\Common is DWORD 1, OneNote will not fetch the cover image.

So the cure is to set these values depending on your need. Aside from the inherent risk of using an undocumented (thus unsupported) registry hack (I checked Office Group Policy to make sure it is indeed undocumented), an additional risk is that other Office components might consult these values, as they are under the common key instead of OneNote key, and that setting these values might affect other functionalities of Office. It is easy to forget having performed this hack when you encounter a problem in other Office components.

If anyone from Microsoft (preferably from the Office group?) sees this entry, please consider adding a dedicated option (configurable from GUI) to disable this feature. The feature itself is annoying enough, it might block UI when the network is slow and GFW further worsens the situation (by making the connection infinitely slow, i.e., disconnected).

Please enable JavaScript to view the comments powered by Disqus.