Solved

Automatically print documents

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

Independent Software Vendors: 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

Suggested Solutions

Title # Comments Views Activity
Error when passing an argument to a vb6 that contains  '/' 7 45
Hide vba in gp 7 113
VBA Shell can't Find Word document 11 127
vb6 - Transfer from MSHFlexgrid1 to xls issue 8 60
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…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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…
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…

685 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