[DUG] Opening Word Document

Jason Coley Jason at software-solutions.co.nz
Thu Aug 19 15:09:26 NZST 2010


Most of the basics of doing things such as mail-merge etc. haven't
changed much, the biggest change is in some of the recent security
updates in Word. Things like merging a dot file to a docx, can't be
done, and with some filters installed (the old compatibility ones
allowing 2003 to open 2007 files) you can't merge a dot to a doc? I have
had to tell clients to make dotx and merge to docx only, which gets
around some changes in the security of merging with Word 2007.

 

I tend to CreateOleObject and automate from there, check the version of
Word and make any changes necessary dependant on version, I don't use
the wrappers at all.

 

Regards from New Zealand (GMT+12)

 

Jason Coley

Software Solutions

 

From: delphi-bounces at delphi.org.nz [mailto:delphi-bounces at delphi.org.nz]
On Behalf Of Cameron Hart
Sent: Thursday, 19 August 2010 2:56 p.m.
To: Jason
Subject: Re: [DUG] Opening Word Document

 

I don't think Delphi 6 supported Word 2007.  Even with BDS 2006 you
needed to choose which version of Office you would support when you
installed the application, as it could only load one set of components
at the same time.  You could choose between 2000 and 2003 versions.

 

Regards,

Cameron

 

 

From: delphi-bounces at delphi.org.nz [mailto:delphi-bounces at delphi.org.nz]
On Behalf Of Eion McIntosh
Sent: Thursday, 19 August 2010 9:59 a.m.
To: NZ Borland Developers Group - Delphi List
Subject: [DUG] Opening Word Document

 

Hi

I have an application which opens a word template document, makes a
connection to the database file and does a mail merge. There is only one
record for this mail merge and we have been running this successfully
for the last 5-6 years with the app opening the document under Word
2000.

We have migrated to Word 2007 and the mail merging process has changed a
bit, so I'm trying to get the app updated for this. The app opens the
document ok, but I can't get it to setup the connection to the data
source automatically. Under the Mail merge menu option it always wants
to be set up from scratch each time. If I open the document directly
from its directory, it makes the connection and works as I want it too,
it's only when I call to open the document from within my app it isn't
making the automatic connection.

Using Delphi 6 and a TWordApplication component.

Any thoughts, as I don't want to user to have to manually make the
connection every time.

Regards

Eion McIntosh | Business Systems Analyst | Silver Fern Farms Limited
199 - 201 Cashel St | PO Box 283, Christchurch 8041, New Zealand
Tel +64 3 371 6725 | Fax +64 3 366 4412 | Mob +64 27 221 1438
Email eion.mcintosh at silverfernfarms.co.nz
<mailto:eion.mcintosh at silverfernfarms.co.nz>   Web
http://www.silverfernfarms.co.nz <http://www.silverfernfarms.co.nz/> 

Silver Fern Farms - 100% Made of New Zealand

This email (including any attachments) is confidential. If you have
received it in error, please let us know immediately by return email and
delete it from your system.

       

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listserver.123.net.nz/pipermail/delphi/attachments/20100819/e1178bb5/attachment-0001.html 


More information about the Delphi mailing list