开发者

Creating an Equation Editor 3.0 equation in a Word 2003 document using a marco (or through the API)

I think the title is fully descriptive now. Anyway, I need to generate a word document from my delphi application. It needs to choose from one of four different equations (with some specific parameters for each document). So far I have manage to create the whole document programmatically except the equation.

Is it possible to create equations programmatically? if so, where is de API documentation from MS? if not, which solution can be 开发者_运维问答used?


Going the VBA route that Brian suggested will only give you the code to open Equation Editor; it won't give you the code for actually creating the equation.

Perhaps the MathType SDK will be of use to you. It's a free download.


Record a macro in a blank document of yourself adding an equation and then save the macro. Opening the macro up in the VBA editor will give you the exact VBA code required to programatically add an equation. If you're using Word's COM API, most of the methods in VBA should have COM counterparts. This technique can be used to discover how to programmatically do anything in Word that you can do in the GUI.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜