FWIW,

AFPRSC is your friend
The way to do it :
1. save the Word doc template as a jpg file (other formats are available I
think)
2. load the jpg file to a dir in the IFS (i.e /home/test)
3. add a AFPRSC keyword to the PRTF record
like AFPRSC('Template.jpg' *JFIF 0.0 0.0 (*PATH '/home/test'))
4. compile the PRTF with DEVTYPE(*AFPDS)

That's it, no need to deal with create overlay and such

if you do not want to change the current records in the PRTF
just a new record "Template" to the PRTF , affix the AFPRSC to it
and issue a corresponding WRITE in the RPG Program


HTH
Gad



date: Fri, 22 Apr 2022 11:33:19 -0500
from: DEnglander--- via MIDRANGE-L <midrange-l@xxxxxxxxxxxxxxxxxx>
subject: RE: RPG or SQL how to generate letters from a Word Document
template??

Jose,

The only way I know of to do that is to use overlays. The last time I did
that [it's been awhile] there was a printer driver I had to install in
word. You would print the template to that printer, which created a file
you copy to the system. Then I think I ran the CRTOVL command to create
the overlay from that template, and used an OVRPRTF in the CL that calls
the RPG program specifying the overlay created by the CRTOVL command [from
the template].

Not sure if that scenario still works, but it did quite nicely at the
time.

Hope this helps.

Doug



"CONFIDENTIALITY NOTICE: This e-mail transmission (and/or the attachments
accompanying it) contain confidential information belonging to the sender.
The information is intended only for the use of the intended recipient. If
you are not the intended recipient, you are hereby notified that any
disclosure, copying, distribution or the taking of any action in reliance
on the contents of the information is strictly prohibited. Any
unauthorized interception of this transmission is illegal under the law.
If you have received this transmission in error, please promptly notify the
sender by reply e-mail, and then destroy all copies of the transmission."





As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.