Indigo Rose Software
  #1  
Old 05-14-2008
tigran tigran is offline
Forum Member
 
Join Date: Apr 2007
Posts: 56
Grin File.Print() Question

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?
Reply With Quote
  #2  
Old 05-14-2008
jassing's Avatar
jassing jassing is offline
Indigo Rose Customer
 
Join Date: Jan 2001
Location: Anderson Island, WA, USA
Posts: 1,901
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.
__________________
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


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.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Copyright © 2000 - 2009 Indigo Rose Corporation. All rights reserved.
Indigo Rose Software