[Zope] m$ word question

Joel Burton joel@joelburton.com
Fri, 26 Jul 2002 09:14:34 -0400


This is a multi-part message in MIME format.

------=_NextPart_000_0029_01C23484.DBA53540
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

> -----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.

------=_NextPart_000_0029_01C23484.DBA53540
Content-Type: text/x-vcard;
	name="Joel Burton.vcf"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="Joel Burton.vcf"

BEGIN:VCARD
VERSION:2.1
N:Burton;Joel
FN:Joel Burton
ORG:Joel Burton & Associates
TITLE:Principal
TEL;WORK;VOICE:(202) 483-7168
TEL;HOME;VOICE:(202) 483-7168
TEL;CELL;VOICE:(202) 251-4877
ADR;WORK:;;1705 P St NW #43;Washington;DC;20036;United States of America
LABEL;WORK;ENCODING=3DQUOTED-PRINTABLE:1705 P St NW =
#43=3D0D=3D0AWashington, DC 20036=3D0D=3D0AUnited States of America
ADR;HOME:;;1705 P St NW #43;Washington;DC;20036;United States of America
LABEL;HOME;ENCODING=3DQUOTED-PRINTABLE:1705 P St NW =
#43=3D0D=3D0AWashington, DC 20036=3D0D=3D0AUnited States of America
URL;WORK:http://joelburton.com
ROLE:Information Technology
BDAY:19721012
EMAIL;PREF;INTERNET:joel@joelburton.com
REV:20011203T044543Z
END:VCARD

------=_NextPart_000_0029_01C23484.DBA53540--