
January 16th, 2006, 01:45 PM
| | | Python and Word
Is there a way to write Word plug-ins in Python? I am using Python
2.3.5 and Word 2000, and need to be able to write a small network
application with a basic GUI which can run inside Word.
cheers,
rod | 
January 16th, 2006, 02:25 PM
| | | Re: Python and Word
rodmc wrote:[color=blue]
> Is there a way to write Word plug-ins in Python? I am using Python
> 2.3.5 and Word 2000, and need to be able to write a small network
> application with a basic GUI which can run inside Word.
>
> cheers,
>
> rod[/color]
Hi Rod,
Does it really need to be an application which runs inside Word? Or is
it OK if it's an external application (with or without GUI) which does
manipulations with MS Word documents using COM objects?
(I frequently do the latter, but don't know about doing the former)
cheers,
--Tim | 
January 16th, 2006, 02:45 PM
| | | Re: Python and Word
Hi Tim,
Thanks for replying.
It needs to be a small application/plug-in which can visualise data
that is either within Word already or which is sent to it via a server
on the localhost. The actual GUI will be very simple, for example and
image and some buttons.
What it actually has to do should be quite simple, but I have never
programmed Word plug-ins before, and am also new to Python.
cheers,
rod | 
January 16th, 2006, 02:55 PM
| | | Re: Python and Word
Hi Rod,
If you download and install the 'Python Win' extensions, which I think
are linked from from the Python download page for windows, you have a
set of COM classes for Python which allow you to do everything you can
do in Word from a Python program.
It allows a lot of interactive exploration at the command prompt,
although not everything is very obvious (in part due to the way the
word object model is structured).
BTW, if you are new to Python, why not use VBA for the program?
cheers,
--Tim | 
January 16th, 2006, 02:55 PM
| | | Re: Python and Word
Hi Tim.
Thanks for the tips.
As for VBA, well I am looking at that as well. Although for
architectural reasons elsewhere in the project Python or C++ are the
only options. While I could use several languages I am trying where
possible to stick to one or at most two.
cheers,
rod | 
January 16th, 2006, 03:05 PM
| | | Re: Python and Word
rodmc wrote:
[color=blue]
> Hi Tim.
>
> Thanks for the tips.
>
> As for VBA, well I am looking at that as well. Although for
> architectural reasons elsewhere in the project Python or C++ are the
> only options. While I could use several languages I am trying where
> possible to stick to one or at most two.[/color]
I guess you will be way easier off writing the GUI-Parts that are embedded
in word in VBA. Actually I have difficulties imaging who not to do so.
But of course you can write your server in python, and expose its
functionality using COM, so that easy access from VBA is granted.
Diez | 
January 16th, 2006, 03:55 PM
| | | Re: Python and Word | 
January 16th, 2006, 04:35 PM
| | | Re: Python and Word
> I guess you will be way easier off writing the GUI-Parts that are embedded[color=blue]
> in word in VBA. Actually I have difficulties imaging who not to do so.[/color]
^^^
Gosh, must be permutation day. That was supposed to be "how".
Diez |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is Off | | | | | | What is Bytes?
We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights.
Get the best answers to your questions from over network members.
|