Word Automation

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
sunilramuAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
JR2003Connect With a Mentor Commented:
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
 
JR2003Commented:
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
 
sunilramuAuthor Commented:
I cant do that, everything has to be done in the backgroud as per requirements.
0
 
JR2003Commented:
You might need a DoEvents after the .Play to allow the animation to run on a separate thread.
0
 
fadlounCommented:
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
All Courses

From novice to tech pro — start learning today.