Why is publishing WordPress post from OneNote is so difficult? No, it should not be difficult.
I love OneNote: it gives freedom to take notes on several levels: available on both PC and Android, easy to create new page, easy to organize several pages on multiple level and comes with an excellent wyswyg editor with image and video embedding (well at least on Windows).
So I often start the guides and tutorials as a OneNote page during the development. Then the only question, how to publish a OneNote page to WordPress without any difficult and manual overhead? Microsoft’s Office apps are infamous of the bloattext of formatting – most cases its not so straightforward to strip down the documents to get a clean html code.
I saw two solutions for OneNote->WordPress export before I found the most suitable for me. Both these have their problems, let me show them.
Microsoft’s WordPress Plugin: OneNote Publisher
As of now (2018) the OneNote Publisher plugin was not updated for 3 years – it very seems that MS released and forgot it completely. Even the title of the plugin page is simply just: ‘=== Plugin Name’ 🙂
Based on the very few feedbacks, it doesn’t work with current WordPress sites since 1-2 years.
Nevertheless, the installation would require to setup client authorization which would make this simple task (export a OneNote page to WordPress post) very overcomplicated and a bit security risky.
Zapier’s zap Add WordPress posts from new notes on OneNote:
Zapier is a cool company and service: they offer to connect apps and automate workflows. There can be connected OneNote to WordPress as well.
Well, to do that they need to get access to your OneNote – which sits most cases on your OneDrive. Though, they don’t need the user name and password for that, Microsoft gives authentication token for their service. You need to logon on Microsoft’s side, you don’t give your MS password to Zapier. However, they still have access to your whole OneNote, not just tonthe page you intended to export
Then they asks the user name and password to your WordPress site. I reckon this as a security risk: saving any user name with password at a 3rd party company is not a good idea. Even if you would trust Zapier (they are here since 2011), but what if a hacker would compromised their database? Although, at least no need an Administrator role user on fhe WordPress site, it’s enough a user with Author role. If you choose them, I strongly recommend to create an Author user just for their service if you choose them.
Easy convert OneNote page to a WordPress post
I wanted a solution which is easy, no need to give away my WordPress or other account to 3rd party company and still gives a clean result. Important was to keep the inline pictures, screenshots at place without any extra hassle. This is what I found:
- Desktop OneNote (the app on Android does not enough)
- Install Mammoth .docx converter plugin to your WordPress site
- Select one page in OneNote
- File->Export (Word Document docx). Save it to a temp local directory
- Go to your WordPress site, Add a new Post->Mammoth .docx converter->Select docx file
- Review and import the content
- Set the title of the post
- Review and edit the post in WordPress
- Add syntax highlighter to codes if needed. I suggest the Syntax Highlighter Evolved for it. E.g. add codes as
your code here
- Don’t forget to publish the page! 🙂