Well, this simple example works for me:
Code:
funPrintByExtension("foo.txt")

Function funPrintByExtension($sFileName)
Dim $oShell
$oShell=CreateObject("Shell.Application")
$oShell.ShellExecute($sFileName,"","","print",1)
If @ERROR "Error in open: "+@ERROR+": "+@SERROR+@CRLF Exit @ERROR EndIf
EndFunction



This prints the file "foo.txt" to my default printer via notepad.

Change the "1" at the end of the line to "0" to hide the notepad window.