|
#1
|
|||
|
|||
|
It appears that File.Print() function acts differently on different machines. Here is what I experience:
1. If the function is called for the first time on the machine that has Microsoft Word installed but never used, then the function throws "File Not Found" error, even though the file to print exists. Calling the function again doesn't produce an error and works OK 2. Calling the function that has at least one printer designated as "default printer" launches the file in Microsoft Word and prints it. 3. Calling the function that doesn't have a designated default printer opens a "Print Dialog" which allows the user to select a printer and start printing Why is this happening? What logic the function uses to determine whether to display Print Dialog or whether to open the document in Microsoft Word and print from there? |
|
#2
|
||||
|
||||
|
I'm guessing your using a .doc file or your file.print() target...
how it works, i assume, is by using the windows api ShellExecute() which can open or print a file. The system looks for the association for the file (.doc in your case) and finds the application (word) if it has a "print" action associated with it (in the registry) it then calls the application with the document and asks it to print. If there's no default printer to print -- what would you have it do? print to all? the reason it fails the 1st time word is run is becuase word needs to have you accept or reject some terms.... the 2nd time doesn't need that agreement to happen. What you're experiencing seems 100% normal to me. |
![]() |
«
Previous Thread
|
Next Thread
»
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Test Drive Question | jrthom1 | Setup Factory 7.0 Discussion | 3 | 05-17-2007 02:45 PM |
| Math.RandomSeed() question | stickck | AutoPlay Media Studio 6.0 | 8 | 06-09-2006 10:42 AM |
| FlashMX vs AMS5 Data Arrays question | Martin_SBT | AutoPlay Media Studio 5.0 | 1 | 01-19-2004 10:05 AM |
| question about sound mp3 | Rapido78840 | AutoPlay Media Studio 4.0 | 4 | 10-10-2003 12:19 PM |
All times are GMT -6. The time now is 02:38 AM.








Linear Mode

