Hi Michael, In essence that's exactly how you create the XML from DP. It really is a matter of setting a root element to encase the whole document, and then marking up the various fields as you said. Of course there are many variants but you have the core idea.
Word documents can be saved as XML documents, which is just XML but with a specific vocabulary, ie particular elements and attributes and rules on how to use them. You can make that into an XSLT template, which is where the learning curve comes in, but for a simple mail merge it is quite easy, and then it is a matter of opening the XML file and applying a template to it, and the result document is the merged document. They call the process a transformation, but for all intents and purpose this is a fancy word for merging. Regards Brian -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Michael Iannantuoni Sent: Sunday, 21 March 2010 7:02 PM To: [email protected] Subject: Re: [Dataperf] DataPerfect & MS Word Mail Merge Hi Brian, Thanks for your advice and link; I have also found your series of article on "Merging DP Reports into MS Word" from May 2008 and they look interesting. Am I being naive in thinking I could add some XML codes in the first page of my existing DP reports and then simply surround other parts of the reports with appropriate <marker> & </marker> ? Michael On 20/03/2010 23:15, Brian Hancock wrote: > Hi Michael, > > I like to use XML from DP, it gives so much flexibility and DP writes XML so > very well. > > Unfortunately Word (at least Word 2003 - the latest I have used) does not > have the ability to directly use XML as a data source (heaven knows why, > perhaps they think it would put people too much into an open source thinking > or something). But there are ways. > > Personally I prefer to use XML as the data source and to create a Word XSLT > as the form document. You can then start to approach some of the flexibility > of WordPerfect's merge using the rich capabilities of XPath and XSLT. In > September 2008 I posted a series of articles of how to do this, I can post > them again if you wish to go this way. This has a relatively steep learning > curve but the results are great, and you can create Word documents without > needing Word, which makes it good for server side automation, and web > enabled DP applications. > > Alternatively I found an article which provides a program to perform a merge > between a Word Template and a simple XML source. > http://www.codeguru.com/cpp/i-n/internet/xml/article.php/c3423 Its a very > simple method. > > Another method is to import the XML into Word and then use the resulting > table as a merge source. > > Then of course you could just use a tab delimited or comma delimited file > and merge directly using that, but my merges have always been too complex > for that to work well. > > Regards > Brian > > > > -----Original Message----- > From: [email protected] > [mailto:[email protected]] On Behalf Of Michael Iannantuoni > Sent: Saturday, 20 March 2010 9:29 PM > To: DataPerfect Users Discussion Group > Subject: [Dataperf] DataPerfect& MS Word Mail Merge > > I have a DataPerfect database that is used, for our village magazine, to > keep track of advertisers, send out renewal reminders, invoices& > receipts etc by producing, from reports, WordPerfect merge data files > which are then merged in form letters within WordPerfect X3. > > This works fine and has done for many years, however because we are > moving to another part of the country soon, I have to hand over this > database to someone else who uses MS Word. Can anyone give me some > advice and guidance please on how to produce MS Word merge data files > from DataPerfect reports? > > TIA > > Michael > > _______________________________________________ > Dataperf mailing list > [email protected] > http://lists.dataperfect.nl/mailman/listinfo/dataperf > > _______________________________________________ > Dataperf mailing list > [email protected] > http://lists.dataperfect.nl/mailman/listinfo/dataperf > > _______________________________________________ Dataperf mailing list [email protected] http://lists.dataperfect.nl/mailman/listinfo/dataperf _______________________________________________ Dataperf mailing list [email protected] http://lists.dataperfect.nl/mailman/listinfo/dataperf
