Wordmaximized, but it's not!?!?

C

Csabi

Hello,

I'm trying to run this code with Word2000:

wordApp.WindowState = Word.WdWindowState.wdWindowStateNormal;
wordApp.ActiveWindow.ActivePane.View.Zoom.PageFit =
Word.WdPageFit.wdPageFitFullPage;

wordApp.Top = 0;

My problem is, that if previously Word was started and it wasn't maximized,
then everything runs OK.

BUT if previously Word was started and it was closed with Maximized
WindowState, then this application crashes, when I try to set the
Word.Application's Top property to 0.

The Exception says that 'window is maximized'. But how can that be
maximized, if I set it's WindowState to be Normal!?

Anyone has some solution how to make this work? Or how to set WordApp to
refresh itself to be REALLY Normal!?

Also after I set WordApp's windowstate to be Normal, sometimes this doesn't
happen, it doesn't set to be WdWindowStateNormal!!!

Someone any advice?

It would be urgent:/

Thanks,
Csabi
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top