Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Make Word visible
Message
 
 
To
02/10/2011 13:46:20
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Environment versions
Visual FoxPro:
VFP 5
OS:
Windows 7
Miscellaneous
Thread ID:
01525400
Message ID:
01525404
Views:
51
>Hi All:
>
>I have code that opens a word file. But how do I make the Word window the active and visible one?
>
>The following code does not do that:
>
>
>loWord.documents.open(MyFile)
>loWord.visible = .t.   &&Word now appears in the taskbar
>loWord.activate()   &&the word icon in the taskbar flashes but VFP is still the active window
>
>
>Thanks,
>
>Yossi

From Russian forum foxclub.ru
#DEFINE wdWindowStateMinimize 2 
#DEFINE wdWindowStateMaximize 1 

loWord.WindowState = wdWindowStateMinimize 
loWord.WindowState = wdWindowStateMaximize && this automatically makes the window activated
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform