Solved

Print  a file on screen

Posted on 2002-05-06
10
173 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
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…

820 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