-----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Greg Conway Sent: Thursday, July 25, 2002 8:14 PM To: Zope@Zope. Org Subject: FW: [Zope] m$ word question
Hi all (especially Oliver if you are there!!)
I am running Zope 2.5.0 - is COM already enabled in Zope by this release by default?
T'aint a Zope question, exactly; it's a Python question. I think you only get COM is you add PythonWin extensions; whether you get those automatically depends on whose Python distribution you're using. Or, if you using the one that comes with Zope, then it sure looks like it is there w/2.5.1 (look in $ZOPE_HOME\bin\win32 under 2.5.0 and see)
PS the VB code I actually want to run is as follows! if anybody else can throw some light on this from my code, would be very very appreciated!
Dim objWord As Word.Document Set objWord = GetObject(Template, "Word.Document")
FullPath = FolderName & "\" & Filename
' Make Word visible. objWord.Application.Visible = True
' Set the mail merge data source objWord.MailMerge.OpenDataSource _ Name:="H:\ENACT\Datatables\nacustdb-010_be.MDB", _ LinkToSource:=True, _ Connection:="TABLE CustDetail", _ SQLStatement:="SELECT * FROM [CustDetail] WHERE CustNoD=" & ContractID
' Execute the mail merge. objWord.MailMerge.Execute
' Set the path and save the current document objWord.Application.ActiveDocument.SaveAs Filename:=FullPath
Unless someone is in the same room as the server and likes pretty pictures, it probably doesn't make any sense to objWord.Application.Visible=True, does it? It should work the same but faster without it. Let us know how it works -- if it's too slow or cranky, you could always contact the database yourself in Python, and edit a RTF file as a string to sub in these values. It would be uglier and lower-level, but might be much faster. Or, if this doesn't happen more than once a second (one a nice box), it might be fine.