MSWord Document Installation How-To
Requirements
- a working Zope 2.3.x environment
- MSWordDocument v0.8 tarball
- UNDER UNIX: vw 0.6.2 (convert MSWord documents into various formats -- http://www.wvware.com)
- UNDER MS-WINDOWS: Microsoft Office 97/2000 and Python 1.5 + Win32 Extensions
Instructions
UNIX-like systems
- Extract MSWord Document Product archive (MSWordDocument.tar.gz) in your Zope Products directory.
- Install vw in /usr or /usr/local and modify the variable self.prefix in
MSWord.py in the product directory following where you have installed wv.
- Move wvZope.xml into '/wvWare_installation_path/lib/wv'.
- Make sure Zope is allowed to write in "/tmp".
- Restart Zope !
MS Windows systems
- Install Python1.5 and Win32 Extensions build 136 (win32all-136.exe).
- Extract MSWord Document Product archive (MSWordDocument.tar.gz) in
your Zope Products directory.
- Generate Python/COM bindings:
- Find and launch "makepy.py"
- Select "Microsoft Word x Object Library"
- Valid
- Make sure Zope is allowed to write in C:\WINDOWS\TEMP
- Start Zope with 'C:\PROGRA~1\PYTHON\PYTHON.EXE C:\ZOPE_ROOT\Z2.PY -D'
Note: Win32 extensions are available from http://downloads.activestate.com/ActivePython/windows/win32all/win32all-136.exe
Modify NullResource.py
To enable transparent MSWordDocument creation when you put a document onto the Zope server using FTP ou WebDAV, you must modify 'NullResource.py'.
This step is not required for MSWordDocument to work. It's only necessary if you want transparent creation of MSWordDocuments.
Follow these intruction to patch NullResource.py:
- Find NullResource.py (located in "ZOPE_ROOT/lib/python/webdav") and edit it.
- Locate the two line:
elif typ[:6]=='image/':
ob=Image(name, '', body, content_type=typ)
- Insert after it:
elif typ == 'application/msword':
from Products.MSWordDocument import MSWordDocument
ob=MSWordDocument(name, body)
- TAKE CARE AT THE IDENTATION
- Restart Zope
Trouble or Success
If you have any trouble send me a mail at eric@netsystems.fr, with you're problem and a Zope traceback if necessary. A mailing-list is also available: click here to subscribe.
If you manage to install and use MSWord Document I would be very happy to hear about it !
Have Fun,
Éric BARROCA.