This project has moved. For the latest updates, please go here.

No 2-D Depictions, Seeming CML Problem

Jul 23, 2011 at 2:39 PM

Hi Chem4Word team,

I want to start off by saying that this add-in is amazing, and the work and thought behind it are spectacular.

Now, I run Office 2007 with Service Pack 2 in Windows 7 (64-bit), and I put the add-in on yesterday. While the tab in the ribbon and everything else shows up, when I "mark" a term as chemistry, I am unable to view how it is written in other formulas or its 2-D structure. As an example, if I write the molecular formula for methane as CH4 (with the 4 as a subscript), then "mark" it as chemistry, it highlights well and all else, but if I want to view it as a 2-D structure or as any of its other names, they are not found under the "View" tab or anywhere else. I have a feeling that it has to do with the pre-loaded CML that comes with the add-in, because as I understood it comes with hundreds of chemicals already loaded into it. I would assume that methane would be one of them, but maybe I am wrong there too.

There is also a problem with the "Load From" feature. While the OSPIN works normally, when I attempt to look up a chemical in PubChem it only gives me the answer "Object reference not set to an instance of an object", and I have absolutely no clue what that means. I read that this is an intermittent problem with the PubChem site, just wondering if anything for that has been resolved. 

Thanks for the help!


Jul 25, 2011 at 11:05 AM
Edited Jul 25, 2011 at 11:54 AM


Thank you for showing interest on Chemistry Add In.

Please use context menu for marking term as Chemistry zone instead of doing the same by using “Mark as Chemistry” button under Chemistry ribbon since it has issue, for more details go through the link Mark as Chemistry button in ribbon

As per your example the formula CH4 is not present as an entry for the value attribute of “Term” tag corresponding to molecular Id 297(which is also a name of the methane’s cml file)  \smart-tag-dict.xml” located at x:\Program Files\Chemistry Add-in for Word\SmartTag\smart-tag-dict.xml. It is not loading the methane’s’ CML file instead its creating a new CML file which is missing necessary tags which are required for displaying its formulas and 2D structure.

Use name methane instead of CH4 and mark it as Chemistry zone, so it will recognize and load the corresponding methane’s cml (297.cml) file hence you can see 2D structure and other formulas for methane. Otherwise please add one more entry in smart-tag-dict.xml with following key value pair

<Term MoleculeID="297" Value="CH4" />

Then open the new instance of MS Word. This resolves the issue.

MSR Support Team

Feb 10, 2012 at 5:54 PM


 First, I want to thank you for coming up with this concept. It would be a great add-in if I can get it to work for me especially in class.

 For background, l am running Office Home and Student 2010 (32-bit) on windows 7 Home Premium (64-bit).

I too am having a similar issue. It doesn't matter what element or formula I put in, it always has to create a new CML for it. After it is marked as chemistry, it becomes highlighted and the view button becomes available but there are no options to view it as  2-D or any other views. I've even  tried inputting a chemical name right out of the gallery (which only shows 6 things in it by the way) and it still would not recognize it. I've also tried using the examples as shown on the manual and to no avail. and when I click  "View CML"  I get the following (this is me using Scott's example of CH4):

<cml nameDict="" xmlns=""><name dictRef="nameDict:unknown">CH4</name></cml>

when l type-in "ethanol" this is what l get under view CML:

<cml nameDict="" xmlns=""><name dictRef="nameDict:unknown">Ethanol </name></cml>

when I load "ethanol" from Chemistry Gallery this is what I get under View CML:

<cml convention="conventions:molecular" conventions="" cml="" cmlDict="" nameDict=""><molecule id="m1"><name dictRef="nameDict:iupac">ethanol</name><name dictRef="nameDict:trivial">alcohol</name><formula concise="C 2 H 6 O 1" inline="CH_{3}CH_{2}OH"/><formula concise="C 2 H 6 O 1" inline="C_{2}H_{5}OH"/><atomArray><atom id="a1" elementType="C" x2="-18.3700008392334" y2="0.6600000262260437"/><atom id="a2" elementType="C" x2="-17.036321717405364" y2="1.4300000262260433"/><atom id="a3" elementType="O" x2="-15.702642595577329" y2="0.6600000262260437"/><atom id="a4" elementType="H" x2="-19.140000839233398" y2="1.993679148054079"/><atom id="a5" elementType="H" x2="-19.703679961061432" y2="-0.10999997377395654"/><atom id="a6" elementType="H" x2="-17.6000008392334" y2="-0.6736790956019918"/><atom id="a7" elementType="H" x2="-16.313335510715092" y2="2.789739319228791"/><atom id="a8" elementType="H" x2="-17.759307924095637" y2="2.7897393192287905"/><atom id="a9" elementType="H" x2="-13.887643015194028" y2="1.484999976158142"/></atomArray><bondArray><bond atomRefs2="a1 a2" order="S" id="b1"/><bond atomRefs2="a2 a3" order="S" id="b2"/><bond atomRefs2="a1 a4" order="S" id="b3"/><bond atomRefs2="a1 a5" order="S" id="b4"/><bond atomRefs2="a1 a6" order="S" id="b5"/><bond atomRefs2="a2 a7" order="S" id="b6"/><bond atomRefs2="a2 a8" order="S" id="b7"/><bond atomRefs2="a3 a9" order="S" id="b8"/></bondArray></molecule></cml>

I have tried reinstalling it; I have also made sure that it is not an inactive add-in (which it isn't since the tab appears on the ribbon, but nonetheless I went ahead and did what others suggested on other posts and check the add-ins under options). l have also tried "mark as chemistry" using the button and as right-click and still the same result. It simply won't recognize anything I've put in.

 I am also having the same issue as Scott regarding the "load from" feature.

I would really like to use this add-in. Please let me know what I should do to remedy the situation. Thanks again!



Feb 13, 2012 at 4:05 AM


You could see 2D structure and other possible names for the mark up terms only if you have a correct, valid CML file for the term. First thing you have to make sure is that there exists a CML file for the term you are going mark as chemistry. If the CML exists, then there should exist a mapping between the mark up term and the corresponding CML file. So, that it searches for the corresponding CML file for the mark up term and loads the same after marking it as Chemistry. This mapping is done within the file called “smart-tag-dict.xml”, which is located at installed path Chemistry Add-in for Word\SmartTag\  folder (C:\Program Files\Chemistry Add-in for Word\SmartTag\smart-tag-dict.xml).

The file Smart-tag-dict.xml contains a key values pairs which maps the chemistry terms with the appropriate CML files, which comes with installation (can be find at C:\Program Files\Chemistry Add-in for Word\SmartTag\).So, if there is no mapping exist between the terms you have chosen to mark as chemistry and CML file, what mark- up process does is, it just create a new cml file which does not contain required information to show up 2D view and other different names for the chemical, just like the CML content you have got for CH4.

i.e <cml nameDict="" xmlns=""><name dictRef="nameDict:unknown">CH4</name></cml>

This issue is also been address in the thread There is nothin in the view list. Please have a look at it for more info.

NOTE : For marking up the terms, please use context menu (right click on the term and click on "mark as Chemistry" Button) instead of “Mark as Chemistry” button in ribbion.The reason being it only creates a new CML file for the term instead of loading the existing valid CML. For more info about this, go through the thread Mark as Chemistry button in ribbon.

The reason for the “load from” feature  issue has been addressed in the thread No 2-D Depictions, Seeming CML Problem.

We hope that above info would help you to resolve the issue. Please get back to us for any further queries.

MSR ER Customer Support Team