Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Print Command on a file
is there a way to execute the print command on a file from excel. liek if
you were to right click on a file and choose print from the shortcut menu. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Print Command on a file
If the file is open you can use
http://www.rondebruin.nl/print.htm#Print -- Regards Ron de Bruin http://www.rondebruin.nl "Spencer Hutton" wrote in message ... is there a way to execute the print command on a file from excel. liek if you were to right click on a file and choose print from the shortcut menu. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Print Command on a file
is there a way to execute the print command on a file from excel. liek if
you were to right click on a file and choose print from the shortcut menu. This one works for me: ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True -- John |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Print Command on a file
"Spencer Hutton" wrote in message ...
is there a way to execute the print command on a file from excel. liek if you were to right click on a file and choose print from the shortcut menu. To simulate this then amend this to your needs This prints a word Doc.... Option Explicit Private Declare Function ShellExecute _ Lib "shell32.dll" _ Alias "ShellExecuteA" ( _ ByVal hwnd As Long, _ ByVal lpOperation As String, _ ByVal lpFile As String, _ ByVal lpParameters As String, _ ByVal lpDirectory As String, _ ByVal nShowCmd As Long) _ As Long Private Const SW_HIDE = 0 Private Const strFilePath As String = "C:\White Rose\Templates\WRS Compliments Slips.doc" Sub WordPrint() Dim retVal As Long retVal = ShellExecute(0, "Print", strFilePath, 0, 0, SW_HIDE) If retVal < 32 Then '// there are Error codes for this..left out MsgBox "An Error occured...could not print" End If End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
command line options/switches to print excel file | Excel Worksheet Functions | |||
command line options/switches to print excel file | Excel Discussion (Misc queries) | |||
How to format the extension less file to print with Dos's Print Command | Excel Discussion (Misc queries) | |||
Create command button to print multiple worksheets in a excel file | Excel Discussion (Misc queries) | |||
Office2000: Missing Print command in File menu | Excel Discussion (Misc queries) |