Making Word Visible 
Author Message
 Making Word Visible

Try add the following statement to your code after making Word visible:

    AppActivate "Microsoft Word", False

Check Access Help on AppActivate.

HTH
Van T. Dinh


My problem is that after using automation to create a Word application and
load a
document, the window containing the instance of Word is maximised but behind
the
window containing the Access 2000 database. You have to click on the task
bar
icon to bring it to the fore. Anybody tell me how to have the Word window
always
on top after the Access VBA code has stopped running?

Mike



Sun, 30 Nov 2003 07:08:08 GMT  
 Making Word Visible
Have you tried:
Activedocument.Activate
?


My problem is that after using automation to create a Word application and
load a
document, the window containing the instance of Word is maximised but behind
the
window containing the Access 2000 database. You have to click on the task
bar
icon to bring it to the fore. Anybody tell me how to have the Word window
always
on top after the Access vba code has stopped running?

Mike



Tue, 02 Dec 2003 19:28:09 GMT  
 Making Word Visible
Someone else suggested AppActivate "Microsoft Word", true and this worked fine
except that if Word was already opened and the user had iconised it, it remained
iconised. In the end I adopted Methods 2 and 3 in Article ID: Q147816 and used
the Win32 API FindWindow function to get hWnd. The class name for Word
is "OpusApp" (the window name is the one in the task bar). Here are some snippets
which if used in conjunction with the code in the article will enable you to
maximize the Word window and bring it to the top even if the user has minimised
the window beforehand.

Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName
As Any, ByVal lpWindowName As Any) As Long

         Const lpClassName = "OpusApp"

         hWnd = FindWindow(lpClassName, 0&)

Mike

Quote:
-----Original Message-----

My problem is that after using automation to create a Word application and load a
document, the window containing the instance of Word is maximised but behind the
window containing the Access 2000 database. You have to click on the task bar
icon to bring it to the fore. Anybody tell me how to have the Word window always
on top after the Access vba code has stopped running?

Mike
.



Fri, 05 Dec 2003 07:03:57 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Making diagram values visible

2. Making a user defined text box visible in a custom form

3. Making pivot table "(blank)" items visible

4. Making animated chart visible

5. Making Outlook visible when launched from VB

6. Making Check Boxes More VISIBLE

7. visible=true/Form.Show makes Form.Location change!

8. Form flashing momentarily before opacity makes it visible

9. Making an object visible and docking it

10. Making Components Visible to Multiple Forms

11. Making my program "visible"

12. Making my program "visible"

 

 
Powered by phpBB® Forum Software