Solved

Automatically print documents

Posted on 1998-10-30
4
259 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

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

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…
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
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…
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…

739 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