Solved

Word Automation

Posted on 2004-08-18
5
169 Views
Last Modified: 2010-05-02
Hi experts,

I am using a lot of automation code, when this is happenning in my application, sometimes screen goes in hang state, Is this because word does not return control until its done with all the code, how do I take care of this , I was thinking of showing an animated gif on screen while application waits for the word to get things done.


sunil
0
Comment
Question by:sunilramu
  • 3
5 Comments
 
LVL 18

Expert Comment

by:JR2003
Comment Utility
You could show word doing it's processing. The users might be really impressed with that.
Just set the application to .Visible and then .Activate it.
0
 

Author Comment

by:sunilramu
Comment Utility
I cant do that, everything has to be done in the backgroud as per requirements.
0
 
LVL 18

Accepted Solution

by:
JR2003 earned 500 total points
Comment Utility
Use the animation control in vb with one of the standard animations provided with vb:

    With Animation1
        .AutoPlay = False
        .Open App.Path & "\FileMove.avi"
        .Play
    End With

   'Do your thing with word here

    Animation1.Stop
0
 
LVL 18

Expert Comment

by:JR2003
Comment Utility
You might need a DoEvents after the .Play to allow the animation to run on a separate thread.
0
 
LVL 5

Expert Comment

by:fadloun
Comment Utility
I would like to suggest you to add progress bar to display the progress of your automations ,,,,, I think it is better than adding animated gif coz user will know that somthing is going on and he has to wait until progress finish.
regards
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

728 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

9 Experts available now in Live!

Get 1:1 Help Now