• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 185
  • Last Modified:

Print a file on screen

What is the command to print a file on screen.

Thanks.
0
carollow
Asked:
carollow
1 Solution
 
xSinbadCommented:
What do you mean 'File On Screen'?

Cheers
Marcus
0
 
n_narayananCommented:
If you want to print a form then

ME.PrintForm
0
 
Richie_SimonettiIT OperationsCommented:
What did you mean by "in screen"?
0
Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

 
apextanCommented:
what do u mean "print a file on screen"?
0
 
barendbCommented:
Form.print "<string>",

obviously you need to open and read the file first.
0
 
carollowAuthor Commented:
Actually, my program will generate a text file and I want the user to view the end result  (the text file) right after the file is being generated. Means that they dont have to open the file by themselves again.
0
 
Richie_SimonettiIT OperationsCommented:
if it is a textfile:
shell "c:\myfile.txt",vbnormal
after your app has finished with its creation.
0
 
n_narayananCommented:
Suppose if the file name is readme.txt then,

Soon after the file is closed issue the command,

Call Shell("notepad  c:\readme.txt", vbMaximizedFocus)

I am using MaximizedFocus you can change it as per your wish.

Cheers

Narayanan
0
 
Richie_SimonettiIT OperationsCommented:
n_narayanan, if it is a text file, you don't need to use notepad.exe in command line of shell (as i posted previously).
OS will opens the file with asociated program. If it is too large, it will ask you to open with wordpad.
Cheers
0
 
Richie_SimonettiIT OperationsCommented:
That code didn't help you? why did you punish n_narayanan with "C" grade?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Exchange Server

The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now