Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ed Ed is offline
external usenet poster
 
Posts: 65
Default Specify network printer in Open for Output method?

My apologies for double-posting - I inadvertently put this in the
general Excel group first.

Right now I have
Open "LPT1:" For Output As #1
But I can't use my LPT1 printer at the moment. Is there a way I can
specify a networked printer?

Ed

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Specify network printer in Open for Output method?

Substitute the network name for LPT1

as an example, this worked for me in the past:

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


--
Regards,
Tom Ogilvy


"Ed" wrote:

My apologies for double-posting - I inadvertently put this in the
general Excel group first.

Right now I have
Open "LPT1:" For Output As #1
But I can't use my LPT1 printer at the moment. Is there a way I can
specify a networked printer?

Ed


  #3   Report Post  
Posted to microsoft.public.excel.programming
Ed Ed is offline
external usenet poster
 
Posts: 65
Default Specify network printer in Open for Output method?

Hi, Tom. Thanks much - I will give this a try.

Ed

On May 3, 10:56 am, Tom Ogilvy
wrote:
Substitute the network name for LPT1

as an example, this worked for me in the past:

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

--
Regards,
Tom Ogilvy



"Ed" wrote:
My apologies for double-posting - I inadvertently put this in the
general Excel group first.


Right now I have
Open "LPT1:" For Output As #1
But I can't use my LPT1 printer at the moment. Is there a way I can
specify a networked printer?


Ed- Hide quoted text -


- Show quoted text -



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Forcing Same Output Regardless of Printer Jay Windley[_2_] Setting up and Configuration of Excel 2 July 3rd 08 05:41 PM
members on my network printer not able to print to default printer smeheut Excel Discussion (Misc queries) 0 June 18th 07 06:42 PM
How do I send a spreadsheet to a printer outside the network? Moe in Goffstown Excel Discussion (Misc queries) 3 February 14th 07 04:34 PM
Selecting a Printer on a network Dave Peterson Excel Programming 1 January 24th 07 08:23 PM
selecting network printer Bill Kuunders Excel Programming 0 January 11th 05 08:22 PM


All times are GMT +1. The time now is 01:33 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"