TonySper
Wed Sep 26 12:50:43 PDT 2007
Dan,
Thanks for explaining the need for Application. Nerd does not fit you. You
have always been a great help to me.
Tony
"Dan Freeman" <spam@microsoft.com> wrote in message
news:OadzAIFAIHA.4828@TK2MSFTNGP04.phx.gbl...
> The reason you need .Application is because you're "getting" an object
> reference to the document, not to Word itself.
>
> Dan
>
> TonySper wrote:
>> Cy,
>> I don't know why it works but you did it.
>>
>> oWord = GetObject('C:\Pifiles\Pimp_Manual.Doc')
>> oWord.Application.Windowstate = 2
>> oWord.Application.Visible = .T.
>> oWord.Application.Activate
>> oWord.Application.WindowState = 0
>>
>> I had to put in the .Application or I get errors but the file opend
>> up to the front.
>> Thank You, Thank You.
>> Tony
>>
>>
>>
>>
>>
>>
>> "Cy Welch" <cywelch@hotmail.com> wrote in message
>> news:324475C9-FF51-43FC-95F3-7F03CE83A11C@microsoft.com...
>>> Ok tony, try this. set windowstate to 2 followed by 0. When I do
>>> that here it minimizes and then brings word to the front. This is
>>> with word 2003 just as you are using, I have not tried this with
>>> 2007 as of yet but who knows?
>>>
>>> --
>>> Cy Welch
>>> Senior Programmer/Analyst
>>> MetSYS Inc.
>>>
http://www.metsysinc.com
>>>
>>> "TonySper" <tsperduti@nospambellsouth.net> wrote in message
>>> news:#gHBn74$HHA.5488@TK2MSFTNGP05.phx.gbl...
>>>> Roger,
>>>> Been trying it all. Do you know that oWord.Windowstate = 1 creates
>>>> an error but oWord.Application.Windowstate = 1 is OK.
>>>> Also oWord.Visible = .T. creates an error but
>>>> oWord.Application.Visible = .T. is OK. This is crazy trying to
>>>> make an application that has been running for 9 years on DOS all
>>>> the way to XP but not on Vista. If they are going to change the
>>>> Automation you would think there
>>>> would be some articles or data around about it.
>>>> Tony
>>>>
>>>> "Roger Ansell" <notmy@realemailaddress.net> wrote in message
>>>> news:e%23EZXi4$HHA.4200@TK2MSFTNGP04.phx.gbl...
>>>>>
>>>>> "TonySper" <tsperduti@nospambellsouth.net> wrote in message
>>>>> news:u1VDnT4$HHA.3400@TK2MSFTNGP03.phx.gbl...
>>>>>> Roger,
>>>>>> Thanks for the help. Have tried as you suggested and the
>>>>>> application still remains on the taskbar when run in Vista. Will
>>>>>> have to keep digging.
>>>>>> Tony
>>>>>
>>>>> OK, try experimenting with ...
>>>>>
>>>>> oWord.WindowState = 1 && and ...
>>>>> oWord.Activate
>>>>>
>>>>> Don't have Vista but even in XP there are circumstances
>>>>> where you need both.
>>>>>
>>>>> -Roger
>
>