Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old January 16th, 2006, 01:45 PM
rodmc
Guest
 
Posts: n/a
Default 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

  #2  
Old January 16th, 2006, 02:25 PM
Tim N. van der Leeuw
Guest
 
Posts: n/a
Default 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

  #3  
Old January 16th, 2006, 02:45 PM
rodmc
Guest
 
Posts: n/a
Default 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

  #4  
Old January 16th, 2006, 02:55 PM
Tim N. van der Leeuw
Guest
 
Posts: n/a
Default 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

  #5  
Old January 16th, 2006, 02:55 PM
rodmc
Guest
 
Posts: n/a
Default 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

  #6  
Old January 16th, 2006, 03:05 PM
Diez B. Roggisch
Guest
 
Posts: n/a
Default 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
  #7  
Old January 16th, 2006, 03:55 PM
BartlebyScrivener
Guest
 
Posts: n/a
Default Re: Python and Word

How to automate Word

http://www.faqts.com/knowledge_base/.../37034/fid/244

rpd

  #8  
Old January 16th, 2006, 04:35 PM
Diez B. Roggisch
Guest
 
Posts: n/a
Default 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

 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

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.
Post your question now . . .
It's fast and it's free

Popular Articles