Solved

Automatically print documents

Posted on 1998-10-30
4
253 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
Comment Utility
Hi,
have you tried sending an Enter with SendKeys?

Bye
0
 
LVL 69

Author Comment

by:Éric Moreau
Comment Utility
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
Comment Utility
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 69

Author Comment

by:Éric Moreau
Comment Utility
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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
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…
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…

772 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

16 Experts available now in Live!

Get 1:1 Help Now