danahn,
ShellExecute(0, "print", "c:\test.rtf", NULL, NULL, SW_HIDE)
The method worked. I'm not sure what you mean with "did not solve"
I tested with rtf file. It worked and printed using default association file (MS WORD). Yes, Word itself still opening for a few seconds (only for the first time, it is much faster after that). And then it close itself.
If you want you can try like this:
; *** Open MS Word, Hide the window
ShellExecute(0, NULL, "Winword", NULL, NULL, SW_HIDE)
; *** Print
ShellExecute(0, "print", "c:\test.rtf", NULL, NULL, SW_HIDE)
By using the method above, you have to close Winword yourself. Because it still open (hidden)
For the second method, it should open the rtf doc in Wordpad (worked for me). But it just open the document. You have to print it using Wordpad menu.
ShellExecute(0, "Open", "Wordpad", "C:\test.rtf", NULL, SW_SHOWNORMAL)
Try again. Come back if you still can't get it to work and post some of your code
-- AirCon --