> > > From: Jenda Krynicky [mailto:[EMAIL PROTECTED] > > > The system('start file.doc') only allows you to trigger the default > > > action defined for the file type. If you want to use the other > > > actions you might like use Win32::FileOp qw(ShellExecute); > > > ShellExecute 'Print' => 'c:\temp.doc'; > > > > ShellExecute $operation => $file; > > > > How to find the list of available $operations ? > > > > The doc says: > > "$operation : specifies the action to perform. The set of available > > operations depends on the file type. Generally, the actions available > > from an object's shortcut menu are available verbs." > > > > "object's shortcut menu" ? > > Could you elaborate please :-) ? > > You can either find the list of actions if you manualy rightclick a > file of that type in Windows Explorer (the topmost section of the > menu except "Open With") or go to the registry (regedit.exe) go to > HKEY_CLASSES_ROOT\.doc, look at the default value (the type of the > file), then go to HKEY_CLASSES_ROOT\<the_type>\Shell and the subkeys > are the different available actions. ShellExecute lets you use either > the name of the subkeys or the title specified in the default value > in that subkey. > > If you need to find the list of actions programaticaly you just use > Win32::Registry ro Tie::Registry to do the same. Find the type from > HKEY_CLASSES_ROOT\.ext, go to HKEY_CLASSES_ROOT\<the_type>\Shell and > list the subkeys. >
A very nice hack, It leads me to imagine lot more possibilities, such as printing invoice when a sale get confirmed ... So glad to hear about this !! Many many thanks for the tips!! Bee -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>