June 6, 200619 yr Hi, I'm having a problem printing using a script that I wrote to automate a very tedious task. I have records that need to be printed from different layouts. They also need to be printed in a particuliar order. So, record "1" needs layout "A", record "2" needs layout "B", and record "3" needs layout "C". (There are many many many records but I'm only dealing with three until I get the script worked out. The script is as follows: ------------------------------ Go to Record/Request/Page [First] Print Setup [] Loop Perform Script [sub-scripts, "go to worksheet"] Print [No dialog] Go to Record/Request/Page [Exit after last, Next] End Loop ------------------- The sub-script above is a scipt I've used throughout the file to take you to the appropriate layout. So far it has worked fine. What happens is three pages print. Record "1" is on layout "A". This is correct. Record "2" and "3" print on layout "A" as well. They should be on layouts "B" and "C". It just occured to me that the scrip is not looping, and the print dialog is just printing all three records at once? Any suggestions would be greatly appreciated! -wing
June 6, 200619 yr The loop looks fine. My guess is the problems is with the "go to worksheet" script. It's not switching layouts for some reason. If you could show us this script, maybe we could figure it out.
June 6, 200619 yr Author Thanks the script is: ----------------------- If ["Component Type = "Zone""] Go to Layout ["Zone Worksheet"] End If If ["Component Type = "Area""] Go to Layout ["Area Worksheet"] End If --------------------------- The script continues in exactly the same function. This script is currently attached to buttons that let you navigate through the records. It seems to work fine, but maybe it's confusing this new script. -wing
June 6, 200619 yr I am guessing you need to set your Print Setup script step to restore so just the current record is printed. Manually choose Print from the File menu. When you see the Print dialog, set it to print the "current record" rather than "records being browsed". When you are done, you actually have to click the Print button to print the document. Once you have printed, enter the first script containing the Print Setup step. Edit the script but then just click the Okay button. You will see a dialog called "Stored Settings" or Keep/Replace. Choose to replace the setting for printing. This will make sure you are always printing the current record rather than the records being browsed.
Create an account or sign in to comment