Solved

Print  a file on screen

Posted on 2002-05-06
10
168 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
 

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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
VBA loop through headers using value 3 57
How to create a duplicate finder Application 9 115
Excel object stays open 19 71
MS Date Picker 64 bit 32 bit issue 12 49
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…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

867 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

21 Experts available now in Live!

Get 1:1 Help Now