Solved

Print  a file on screen

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

Thanks.
0
Comment
Question by:carollow
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
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 

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 50 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

ScreenConnect 6.0 Free Trial

Explore all the enhancements in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

Question has a verified solution.

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

Suggested Solutions

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

823 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