Ray et al -
I have been working on this one issue - on and off - for more than a week now and it is driving me crazy. (What do you mean, "It must have been a short trip.") lol Let me give you more detail to see if we can arrive at a solution. (I'll also be repeating some information I provided earlier, just to have all the info in this one posting).
In my home, I have four networked computers. Most of the time I work out of the office which is the "main" computer. I have two printers attached to the computer and, at present, neither is set for sharing (because my other computers have their own printer).
The printer I want to use is an HP 5 which has many options such as (1) manual feed, (2) one-side page printing (3) dual-sided printing which can be either head to head or head to foot, and (4) an automatic envelope feeder.
In Windows, (Control Panel - Printers & Faxes), I have set up a "printer" for EACH of the options I may want to choose so that I don't have to modify the printer settings to get the results I want.
Among these "printers" is an "Auto HP LaserJet 5 - Envelopes."
If I choose this printer from Microsoft Word, it correctly retrieves and prints to an envelope. If I click on a command button in Access, it correctly retrieves and prints to an envelope. This satisfies me that my printer definition has been set up correctly.
I read, several times, the AlternateDefaultPrinter(printername) documentation on page 61 of the Supplment 1.1 (as you suggested, Ray).
I have come up with this programming:
AlternateDefaultPrinter("Auto HP LaserJet 5 - Envelopes")
Newpage(950,412) PrintString("Spencer Wulwick (MVR)", 30, 25, 0, "Arial", 14, 0) PrintString("210 South Hale Avenue", 30, @PageExtentY(), 0, "Arial", 14, 0) PrintString("Tampa, FL 33609-3933", 30, @PageExtentY(), 0, "Arial", 14, 0) PrintString(Mail Name, 450, 200, 0, "BArial", 16, 0) PrintString(Street Address + " " + Apt, 450, @PageExtentY(), 0, "BArial", 16, 0) PrintString(City + ", " + State + " " + Zip, 450, @PageExtentY(), 0, "BArial", 16, 0) FinishPage()
The printing itself is perfect in terms of the merge, placement of print, etc. etc. The PROBLEM is that it does not find the designated (alternate) printer and prints to the (default) printer which is letter size.
BECAUSE the description of AlternateDefaultPrinter(printername) says that it "prints to the alternate named printer using the printer's "share" name I EVEN modified the printer definition to allow sharing, assigned a share name and modified the code to "point" to the share name. It made NO difference and still printed on letter paper.
To "verify" that I understood the programming, I changed the alternate named printer to the OTHER (non-sharing) printer (hp officejet 6110 all-in-one) and it CORRECTLY found and printed to that printer (the problem there is that it doesn't have an automatic envelope feeder).
So, I seem to understand the programming which I can modify to "switch" between my two printers ... but I cannot get it to recognize the envelope feeder in my "Auto HP LaserJet - Envelopes" printer.
As stated previously, being able to print an envelope "on-the-fly" is extremely important to me. Can anyone come up with any ideas that I might be overlooking?
|