word application window auto resizing problem

S

sajin

Hi all,

I am implementing word addin setup program which creates a custom
button in the word toolBar , on click of that i am opening a windows
form , on click of the button i have written the folowing code
wordApp = CType(applicationObject, Word.Application)
wordDoc = wordApp.ActiveDocument
wordApp.WindowState = Word.WdWindowState.wdWindowStateNormal
wordApp.Resize(Width:=wordApp.Width - 180,
Height:=wordApp.Height)
wordApp.Move(182, 3)

but at the same time on close of the form i want to resore into the
full window , i passed the word document and application object to the
constructor for the form class
but if i write
wordApp.WindowState = Word.WdWindowState.wdWindowStateMaximize
it is not doing the job
plz help me

Thanks
Sajin
 

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