Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 176
  • Last Modified:

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
0
sunilramu
Asked:
sunilramu
  • 3
1 Solution
 
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:
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 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

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now