Re: embed python in ms-word?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • oyster

    Re: embed python in ms-word?

    in fact, during my work, I often write documnets in ms-word. But the
    doc has many numbers in it, which need to be calculated and to be
    modified frequently.

    Is there a method to write a ms-word add-in, so that
    1.I can type in the calculation steps in some program language,
    please have a look at http://blender.bokee.com/inc/word_add_in1.jpg

    2.then the result (here, it is 8) is shown in the doc when I close this window?
    please have a look at http://blender.bokee.com/inc/word_add_in2.jpg

    3.when I double-click the result 8, I can view/edit the code again

    4.the code for calculation is stored in DOC file too, I can change it later

    mathtype equation is a kind of such thing, but only for displaying
    nice equation

    I don't think vba is a good answer, the main reason is: the vba code
    has an incompact link with its result in the documnet
  • Diez B. Roggisch

    #2
    Re: embed python in ms-word?

    oyster schrieb:
    in fact, during my work, I often write documnets in ms-word. But the
    doc has many numbers in it, which need to be calculated and to be
    modified frequently.
    >
    Is there a method to write a ms-word add-in, so that
    1.I can type in the calculation steps in some program language,
    please have a look at http://blender.bokee.com/inc/word_add_in1.jpg
    >
    2.then the result (here, it is 8) is shown in the doc when I close this window?
    please have a look at http://blender.bokee.com/inc/word_add_in2.jpg
    >
    3.when I double-click the result 8, I can view/edit the code again
    >
    4.the code for calculation is stored in DOC file too, I can change it later
    >
    mathtype equation is a kind of such thing, but only for displaying
    nice equation
    >
    I don't think vba is a good answer, the main reason is: the vba code
    has an incompact link with its result in the documnet
    I don't know what you mean with the last sentence - but I still think
    VBA is the answer. There is no other way to write a plugin or some such
    for word than using COM, and VB *is* COM. So whatever you can do in
    Word, it's exposed in VBA. Bringing python into the mixture is just
    creating a lot of hassle.

    Automating word with Python is a different thing - that seems to be
    popular and powerful.

    Diez

    Comment

    Working...