Marvin OLE - Copy from Applet into Office

User 8139ea8dbd

28-02-2008 19:42:23

I am a bit behind all the new exciting developments here.





I just tested the Marvin OLE, it looks really nice and I am sure chemists would love to be able to paste Marvin object instead of low-resolution images into PowerPoint slides.





Two questions:


1) When double click an OLE object in an office document then close the Sketcher, it always popup the save dialog, even if no editing has been performed. Could the code be updated in the next release, so that the dialog only appears when it's necessary? Of course, I just double click to "zoom in" instead of modifying the structure.





2) If I copy a structure from a Marvin Applet, it becomes a picture when pasted into Office. (say copy from the following page)





http://www.chemaxon.com/marvin/examples/applets/example-sketch3.1.html





Any reason Applet cannot copy an OLE object into the clipboard. I want to write a web tool to display several structures for a user, so that that user can then copy the structures into a powerpoint slide, without the need to construct structures from smiles one at a time. Do I have to display the structures using web start instead?

ChemAxon 7c2d26e5cf

29-02-2008 19:44:03

Thanks for the bug reports. We will check them.


Just one note about OLE copy. To be able to copy OLE from applet to office document, Marvin Beans has to be installed. Is Marvin Beans there?

User 8139ea8dbd

29-02-2008 21:46:52

Sure, Marvin bean is installed.





I could copy molecules from Web Start examples hosted on ChemAxon web site and copy then into Office; them behave as expect. But copying molecules from Applets ends up in the picture format.

ChemAxon 7c2d26e5cf

01-03-2008 00:27:42

Indeed, OLE copy does not work in Marvin 5.0.1 applet package.


The problem is that a jar (that OLE copy requires) is skipped from the applet release.


I have uploaded it to the Marvin site. So, the online Marvin examples are working fine, now.


Please download the following jar and copy it into the directory of marvin applet.


http://www.chemaxon.com/marvin/izmcom-natives.jar


It will solve the copy issue.


Of course, in the next release, the mentioned jar will be in the downloadable applet package.

ChemAxon 7c2d26e5cf

01-03-2008 02:58:44

The first issue (drop needless confirmation dialog by exit from sketcher in OLE mode) is also fixed.


Next release will include the bugfix.

User 8139ea8dbd

01-03-2008 03:08:56

Nice, all seems to work. Thanks.





One more follow-up question. Is there a way to use transparent background? For people making powerpoint presentations, this is a big plus. (it will be super if one has a transparent option in Sketch color option)


If one does not have Marvin Bean, and simply copy a structure from an applet into Office as an image, is there a way to set transparent background?


It might make sense to set default background to transparent than white.





I just tested ChemDraw, its OLE object is shown in transparent.

ChemAxon 7c2d26e5cf

01-03-2008 03:19:33

Unfortunatelly not. The image in Marvin OLE object is an EMF. We create EMF with the Freehep API. It is a Java libary to write graphics into several image formats (also in EMF). But Freehep does not support transparent EMF.