Solved

Automatically print documents

Posted on 1998-10-30
4
260 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses
Course of the Month8 days, 23 hours left to enroll

617 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