Opening Word

K

klav

I am opening Word from another application through a macro where I do a lot
of manipulation in the file and then I show it in print preview.

I don't want the user to see the file until it's ready to be shown in print
preview. I immediately make the window minimized and application invisible
but there is still this slight period where the user sees the open file.
What's the best way to control this?
 
H

Howard Kaikow

use the range object instead of the selection object, and make sure that the
macro is doing its thing in a non-visible instance of word.

if word is made non-visible, there's no need to minimize.

as a last resort, use api calls to temporarily lock the keyboard and mouse
so the user cannot access the doc.
 
H

Howard Kaikow

Ian B said:
Be aware of some "gotcha's" with app invisible.
Microsoft acknowledge some difficulties with Selection.MoveUp and
Selection.MoveDown
Symptom will be Word freezes 100% CPU utilisation.
See link below
http://www.kbalertz.com/kb_235876.aspx

That's why I suggested using the Range object.
Use the Selection object only when absolutely necessary.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top