473,503 Members | 12,516 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

Jan 16 '06 #1
7 1659

rodmc wrote:
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


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

Jan 16 '06 #2
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

Jan 16 '06 #3
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

Jan 16 '06 #4
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

Jan 16 '06 #5
rodmc wrote:
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.


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
Jan 16 '06 #6
> 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.

^^^

Gosh, must be permutation day. That was supposed to be "how".

Diez

Jan 16 '06 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

220
18803
by: Brandon J. Van Every | last post by:
What's better about Ruby than Python? I'm sure there's something. What is it? This is not a troll. I'm language shopping and I want people's answers. I don't know beans about Ruby or have...
4
4191
by: Mickel Grönroos | last post by:
Hi! I'm fiddling with Python for Windows (normally using Linux) and as a part of that I want to try to make a simple word frequency list generator to be used in conjunction with Microsoft Word....
23
2123
by: Yannick Patois | last post by:
Hi, Under some naming conditions of module files, it seems that python lost class static variables values. It seems only to append when importing a "badly" named module that itself import a...
5
2866
by: Fazer | last post by:
Here comes another small question from me :-) I am curious as to how I should approach this issue. I would just want to parse simple text and maybe perhaps tables in the future. Would I have to...
68
5775
by: Lad | last post by:
Is anyone capable of providing Python advantages over PHP if there are any? Cheers, L.
137
6928
by: Philippe C. Martin | last post by:
I apologize in advance for launching this post but I might get enlightment somehow (PS: I am _very_ agnostic ;-). - 1) I do not consider my intelligence/education above average - 2) I am very...
34
6360
by: Ville Voipio | last post by:
I would need to make some high-reliability software running on Linux in an embedded system. Performance (or lack of it) is not an issue, reliability is. The piece of software is rather simple,...
8
4197
by: John Salerno | last post by:
I figured my first step is to install the win32 extension, which I did, but I can't seem to find any documentation for it. A couple of the links on Mark Hammond's site don't seem to work. ...
1
2243
by: Chris Carlen | last post by:
Hi: I'm writing a Python program, a hex line editor, which takes in a line of input from the user such as: -e 01 02 "abc def" 03 04 Trouble is, I don't want to split the quoted part where...
13
1724
by: =?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?= | last post by:
Within a few weeks, we will release Python 2.5.3. This will be the last bug fix release of Python 2.5, afterwards, future releases of 2.5 will only include security fixes, and no binaries (for...
0
7098
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7296
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7470
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5604
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5026
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3186
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1524
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
751
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
405
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.