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: 127
Default How to Print a File or Control

Excel 2003. FIRST, I want to just be able to print (to my default printer)
the contents of a text control on a user form. I was given the following
code, but the printout is funky (margins are super narrow).

Dim PrinterName As String, I As Integer
I = InStr(Application.ActivePrinter, " on ")
PrinterName = Mid(Application.ActivePrinter, 1, I - 1)
Open PrinterName For Output As #1
Print #1, ProcessStatus.ProcStat.Text
Close #1

IS THERE A BETTER WAY TO ACCOMPLISH THIS?

SECOND, How does one print out an external file from Excel VBA code.
Suppose for instance that I want to print out file "Test.txt." How would I
program that? Thanks for the help and God bless.

--
Dr. Doug Pruiett
Good News Jail & Prison Ministry
www.goodnewsjail.org
 
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
ADDING A PRINT CONTROL BUTTON Tonya Excel Worksheet Functions 1 September 25th 06 09:55 PM
Control item PRINT in menu FILE of Excel [email protected] Excel Discussion (Misc queries) 0 April 6th 06 10:25 AM
How do I print from a file created from sending a print to a file Ted Johnston Excel Discussion (Misc queries) 1 February 23rd 06 03:10 AM
Disable printPreview's Print Control! is it possible???? Andoni[_42_] Excel Programming 2 September 13th 04 08:24 PM
Print Control in Word/Excel Charles Maxson Excel Programming 0 December 30th 03 08:55 PM


All times are GMT +1. The time now is 06:57 AM.

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"