Solved

Automatically print documents

Posted on 1998-10-30
4
257 Views
Last Modified: 2010-04-30
I have an application (written in VB5) that needs to print documents without user intervention.

I have some problems with two applications: Project and PowerPoint. They always pop the printer dialog box.

How can I respond automatically to them (I only want to press Enter).

Thanks.
0
Comment
Question by:Éric Moreau
  • 2
4 Comments
 
LVL 1

Expert Comment

by:ajmendes
ID: 1442581
Hi,
have you tried sending an Enter with SendKeys?

Bye
0
 
LVL 70

Author Comment

by:Éric Moreau
ID: 1442582
I have tried it and it doesn't always work. I start multiple impression in a short time so I can't be sure which window will receive the key.

An other solution is the SendMessage API function but I don't have the handle to the printer dialog box!

Sorry, try again!!!
0
 
LVL 3

Accepted Solution

by:
altena earned 50 total points
ID: 1442583
I have done this from excel... And yes it is a bit trucky.

Simply set, you have te be very specific in issuing the "Print"
command, if not, the MS-office apps will pop-up those ##$$#$
dialog boxes.

Thing to remember: It can be cone in clean VB(A), so no Sendmessage's or other hacking.

Good luck
0
 
LVL 70

Author Comment

by:Éric Moreau
ID: 1442584
I had to give some parameters that have default value. I think that Microsoft and me do not have the same signification of "Default value".

Thanks.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
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…
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…

808 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