01-01-1995, 02:00 AM
On Friday, January 15, 1999, 03:12 PM, tim messink wrote: I am currently converting spoolfiles to word documents in a round about way. I do the typical copy of the spoolfile to shared folders, then I have the user open the text file in word, I have a button they click on the toolbar that runs a macro converting specific codes to page breaks, landscaping the document, and changing the font. This works great but I hate user intervention.... How can I embed the codes for font, landscape and page breaks into the text document so that word knows what they are, also where can I find those codes. I tried PCL codes and such but failed.. Tim Messink Here's a thought, although I don't know how much work it will be on your part. Write the data from the spooled file (either before the file is created using the data that creates the spool file, or after it is created and you copy it to a database file), to the IFS. You can then insert the any printing codes you need. Create the file in the IFS with the *.RFT (Rich Format Text) file type to preserve your formatting. You can then open this file with your word processor and all those codes will be in effect. How to determine the codes? Couple of things come to mind: 1. Create a document in WORD (or whatever word processor you favor), putting in the various codes you want to see (Font, underline, bold, landscape, portrait, etc..). Save the file as a *.RTF file. You can now examine the file (with the codes in it) using a DOS TYPE command or you can write it to an AS/400 database using the techniques I demonstrated in the article, "Building the Bridge between your PC and RPGIV" in the July 98 issue of MC. You can now examine the file and possibly determine what the various codes are. This method could prove to be very tedious I'm afraid. 2. Get hold of a PCL5 programming guide (probably comes with your printer, or at least should be obtainable from the printer manufacturer) and get the codes from there. This is my round-a-bout solution to your problem. Maybe someone else has a more elegant one.