Information générale
Catégorie:
COM/DCOM et OLE Automation
>I've got an strange one here.
>
>If you create a new instance of Word and change its WindowState to 2 (Minimised) then set its Visibility to .T. the resulting instance of Word has no Menu bars?
>
>Does anyone know why this happens and if there is a way of turning the bars back on?
>
>Thanks in anticipation.
You need to activate word application before changing/setting windowstate:
"...Use the Activate method to activate a window prior to setting the window state..." (VBA for Word Help on "Windowstate property").
The problem is that you can not activate invisible word application. But if it is visible, then you do not need to issue additional 'activate'.
So why not to use this:
oword=createobj....
oword.visible=.t.
oword.Windowstate=2
....
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement