tigran
05-14-2008, 01:31 PM
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?
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?