Hi!
I see your point. This always was a big prblem in automating MS Word.
Is there any way to avoid that dialog?
Also, I just looked to MS Word 2000 objects model help and see following:
WindowState Property Example
This example maximizes the active window if it's not maximized or minimized.
If ActiveDocument.ActiveWindow _
.WindowState = wdWindowStateNormal Then _
ActiveDocument.ActiveWindow.WindowState = wdWindowStateMaximize
As you see, each document has such thing as ActiveWindow, that could be minimized separately.
>Vlad,
>
>I did think about using that approach, and it would certainly make things simpler. However, what happens if Word throws an error?
>
>My reports all allow the user to select what fields they want to output. If they change any of the output fields and forget to update the Merge Main document before they run the report then Word pops up a box asking if it should remove the field - if word was not Visible then this would just sit there for ever.
>
>Any thoughts?
>
>>Hi!
>>
>>Did you tried following?
>>
>>oWord.Visible = .F.
>>
>>
>>Just make all work when Word window is not visible. Then make it visible again.
>>
>>>Hi all,
>>>
>>>I have an application that does a series of MailMerges into Word so I minimise Word before I start and reset it when finished. This prevents to much screen activity. However the Minimise does not appear to work in Word 2000, I guess this has something to do with the fact that each new document is a new window, but is there some way of achieving the same result?
>>>
>>>Thanks in anticipation.
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.comICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs
It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.