Re: IFMX and Word or Wordperfect
Posted in 1995
>
> I need to create both a WordPerfect and a Microsoft Word
> mailmerge file from data stored in an Informix database.
>
> Does anyone have the file formats for these two products, or
> better yet, has someone done this and might be willing to share
> the code.
>
Hi, this is a ace report that creates a mail merge file for
wordperfect. Field 1 is the name and address, field 2 is
is the salutation. I hope this helps.
Regards - Lester
#############################################################################
# Lester Knutsen lester@access.digex.net #
# Advanced DataTools Corporation Voice: 703-256-0267 #
# Grant group privileges for Informix databases with DB Privileges #
#############################################################################
database leads end
output
top margin 0
bottom margin 0
left margin 0
report to "merge.rpt"
end
select fill1, fname, lname, title, company, add1, add2, city, state, zip
from leads
order by company desc
end
format
on every row
{ Print name and address - first Field in Mail Merge }
print fname clipped;
if ( fname is not null ) then print " ";
print lname
if ( company is not null ) then print column 1, company
print column 1, add1
if ( add2 is not null and add2 > " " ) then print column 1, add2
print column 1, city clipped, ", ", state, " ", zip clipped;
print ascii 18; { End of Field for WordPerfect }
{ Print salutation - 2ed field - Dear XXX }
if ( fill1 is not null ) then
begin
print fill1 clipped;
print " ";
print lname clipped;
end
else print fname clipped;
print ascii 5; { End of Record for WordPerfect }
print ascii 12;
end