I am trying to figure out how you can print a file, for example an excel spreadsheet using the Win32 Printing and Print Spooler Functions. I know the path of the file, but don't have a clue to send it to the print spooler.
A:
to print an excel file, you will have to use excel (or write your own excel file parser - ouch). eg, via Automation. try googling: excel automation
steelbytes
2010-04-19 02:02:50
I am speaking in the sense of programatically using the Win32 API (i.e. Printing and Printer Spooler Functions).
tool4scs
2010-04-20 12:30:20
You will have to use the COM API for this.
Daniel
2010-06-24 07:24:41
+1
A:
You can call ShellExecute with lpOperation="print", see http://msdn.microsoft.com/en-us/library/bb762153(VS.85).aspx
Note this will only work for document types that have the print verb defined, right click on a document you want to print and see if Print appears in the menu.
Tony Edgecombe
2010-05-07 09:52:24