Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / June 2005

Tip: Looking for answers? Try searching our database.

Opening Word

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
klav - 27 Jun 2005 22:26 GMT
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?
Howard Kaikow - 27 Jun 2005 22:41 GMT
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.

Signature

http://www.standards.com/; See Howard Kaikow's web site.

> 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.
[quoted text clipped - 3 lines]
> but there is still this slight period where the user sees the open file.
> What's the best way to control this?
Ian B - 29 Jun 2005 06:35 GMT
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

HTH

Ian B

> 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.
[quoted text clipped - 3 lines]
> but there is still this slight period where the user sees the open file.
> What's the best way to control this?
Howard Kaikow - 29 Jun 2005 22:28 GMT
> 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.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.