Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() I'd like to print a simple error report from the application to the default network printer without using a worksheet. The text is in a string. Any ideas? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
First, I went to the immediate window in the VBE to query the activeprinter
string To a Network printer ? activePrinter \\ARDAPS01\1D343E on Ne02: then I used the first part in the below code: Sub Macro5() Dim ctrl As Long Dim tmpstr As String Open "\\ARDAPS01\1D343E" For Output As #1 Print #1, "[Start of Printing Test]" For ctrl = 1 To 10 tmpstr = "Printing Line " + Str(ctrl) Print #1, tmpstr Next tmpstr = "[End of printing test]" + Chr(12) Print #1, tmpstr Close #1 End Sub Worked for me. Regards, Tom Ogilvy "Steve" wrote in message ... I'd like to print a simple error report from the application to the default network printer without using a worksheet. The text is in a string. Any ideas? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
printing a report | Excel Worksheet Functions | |||
Printing multiple report based on a list | Excel Discussion (Misc queries) | |||
Printing multiple graphs on a report | Charts and Charting in Excel | |||
Printing a report | Excel Discussion (Misc queries) | |||
Printing report that is portrait and landscape | Excel Discussion (Misc queries) |