Solved

Problem: Word is currently printing...

Posted on 1998-01-08
1
289 Views
Last Modified: 2012-06-27
Greetings,
I have an  Access97 application which omang other things prints Word97documents based on database member selection information. I am using DDE and if the Documents are short 4-5 pages I don't have a problem. If the Documents are longer I get "Word is Currently printing...." messages. What is the best way to halt the DDE request to open and print until the current document has been spooled.

I know you can set background printing options to hide the message but does this actually halt the DDE request until the job is spooled? If no, what is my best alternative?

Thanks,
Brad
0
Comment
Question by:bhummel
1 Comment
 
LVL 12

Accepted Solution

by:
Trygve earned 50 total points
Comment Utility
Does the "Word is Currently printing ..." message come as an error message. Is so you make your error trapping check for this particullar error code and make your code loop until it stops.

Example:

On error goto errCheckItOut

' Your code

Exit Function

errCheckItOut:
  If err = <The error code> And error Like "Word is Currently*" then
   Resume 0 ' Try again
  else
   MsgBox(err & " "& error) ' display error information
   End
  End If

If you don't want it to try forever you could also include a counter and make it stop retrying after say 10,50... attempts with some message to the user.


You may also have a look into Automation which is the recommended way of working with other, at least Microsoft, applications.

Feel free to comment if you have any questions.

Hope this helps !
Trygve
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
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…

762 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

12 Experts available now in Live!

Get 1:1 Help Now