Solved

Print  a file on screen

Posted on 2002-05-06
10
167 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
Comment Utility
What do you mean 'File On Screen'?

Cheers
Marcus
0
 
LVL 3

Expert Comment

by:n_narayanan
Comment Utility
If you want to print a form then

ME.PrintForm
0
 
LVL 16

Expert Comment

by:Richie_Simonetti
Comment Utility
What did you mean by "in screen"?
0
 

Expert Comment

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

Expert Comment

by:barendb
Comment Utility
Form.print "<string>",

obviously you need to open and read the file first.
0
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 

Author Comment

by:carollow
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
That code didn't help you? why did you punish n_narayanan with "C" grade?
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

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…
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…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

771 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now