You often ask us, ‘why doesn’t Chem4Word work in Office Online apps?’ After all, you would be able to use it on any platform that supported them. Such as Apple Mac, used by many chemists in preference to Windows.
A Bit of History
The answer is complicated and lies in the history of Chem4Word. It started collaborative project between Microsoft Research and Cambridge University more than ten years ago. If you wanted to develop a Word add-in at that time, you had two options.
First, you could write it in Visual Basic for Applications. This is great for quick, relatively unsophisticated customisations, such as custom templates or dialog boxes.
But Chem4Word demanded a lot more from the platform. So it used Visual Studio Tools for Office (VSTO). VSTO, pronounced ‘visto’, ties Word and other Office apps into the .NET Framework using the C# programming language. This unleashes the full power of Windows, including sophisticated graphics and XML handling. This is just what was needed to power Chem4Word.
The Present
A lot has changed since it was first written. Microsoft sank more resources into developing the cloud-based versions of Office and now embraces JavaScript as a development language. It’s bringing its online APIs into line with the VSTO-supported APIs. There will soon be little to choose from them.
But, and this is a very big ‘but’: JavaScript is a very different language to C#. Despite being ‘the programming language of the Web’, it is arguably a poor relation and does things very differently. Translating our tens of thousands of lines of code from C# to JavaScript is a huge task! JavaScript’s graphics capabilities come second to the native Windows platform. For instance, ACME would be difficult to reproduce using the HTML canvas:
The Office Online development platform is also limited. We can’t easily access compound libraries downloaded to the computer. The security restrictions of running in a web browser put paid to that, and other features! Office Online add-ins can only interact with the user through task panes. It’s difficult to shoehorn all our functionality into those.
What Now?
Microsoft have pledged continued support for VSTO-based applications. So, for now we will dedicate our development resources to enhancing Chem4Word on this platform. Our new ACME editor will allow us to add exciting new features, like reactions and structural templates, while maintaining the full Chem4Word experience that you know and value.
We will still be closely watching how the new Office Developer story unfolds. When we are happy that we can take what we have done to the new online platform, with minimal effort, hassle and degradation of functionality, then we will provide a Chem4Word that’s as fully-featured and easy to use online as it is on your desktop!
As a final comment, with the web version of Word, you can open, read and edit documents containing Chemistry that were created with the desktop version of Word without losing the Chemistry components.