LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Printing Text from Excel

Sub Macro5()
Dim ctrl as Long
Dim tmpstr as String
Open "LPT1:" 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


replace LPT1 with the device name.

--
Regards,
Tom Ogilvy

"RonF" wrote in message
...
I want to send a string of test to the printer while running in excel
automation. The only way I've found to to this is first put the text in

an
unused cell, select the cell and then print the cell using
selection.printout. Does anyone know of a more direct way?
--
Thanks
RonF



 
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
excel extended text printing beussg Excel Discussion (Misc queries) 1 December 19th 08 08:11 PM
Text-wrap & Printing in Excel Anne Excel Discussion (Misc queries) 0 August 4th 06 04:09 PM
When printing using Excel the text does not fit in the cell MSUbully Excel Discussion (Misc queries) 2 March 25th 05 06:49 PM
Printing Text from Excel Automation Tom Ogilvy Excel Programming 0 August 6th 04 04:07 PM
Text printing from VBA Excel macro ben Excel Programming 1 November 30th 03 12:15 AM


All times are GMT +1. The time now is 04:01 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"