?
Solved

Print  a file on screen

Posted on 2002-05-06
10
Medium Priority
?
177 Views
Last Modified: 2010-05-02
What is the command to print a file on screen.

Thanks.
0
Comment
Question by:carollow
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
10 Comments
 
LVL 6

Expert Comment

by:xSinbad
ID: 6992886
What do you mean 'File On Screen'?

Cheers
Marcus
0
 
LVL 3

Expert Comment

by:n_narayanan
ID: 6992909
If you want to print a form then

ME.PrintForm
0
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 6992922
What did you mean by "in screen"?
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Expert Comment

by:apextan
ID: 6993328
what do u mean "print a file on screen"?
0
 
LVL 1

Expert Comment

by:barendb
ID: 6994009
Form.print "<string>",

obviously you need to open and read the file first.
0
 

Author Comment

by:carollow
ID: 6996633
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
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 6996758
if it is a textfile:
shell "c:\myfile.txt",vbnormal
after your app has finished with its creation.
0
 
LVL 3

Accepted Solution

by:
n_narayanan earned 100 total points
ID: 6997979
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
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 6998013
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
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 6998674
That code didn't help you? why did you punish n_narayanan with "C" grade?
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses
Course of the Month11 days, 14 hours left to enroll

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question