Avatar of dmpuser
dmpuser
 asked on

Maximize a word minimized

I must check if a document word, open in this way....

77     Set WordApp = Nothing
78     Set worddocument = Nothing


83  Set WordApp = New Word.Application
86   Set worddocument = WordApp.Documents.Open(percorso & "\" & Forms!reword.Elenco5, , , , , , False)

worddocument.CommandBars("Menu Bar").Controls(6).Controls(7).Enabled = False
worddocument.CommandBars("Menu Bar").Controls(6).Controls(6).Enabled = False
worddocument.CommandBars("Menu Bar").Controls(6).Controls(9).Enabled = False
worddocument.CommandBars("Menu Bar").Controls(6).Controls(10).Enabled = False
worddocument.CommandBars("Menu Bar").Controls(6).Controls(11).Enabled = False
worddocument.CommandBars("Menu Bar").Controls(6).Controls(12).Enabled = False

worddocument.CommandBars("Menu Bar").Controls(6).Controls(8).Enabled = False

worddocument.CommandBars("Menu Bar").Controls(1).Enabled = False
worddocument.CommandBars("standard").Controls(1).Enabled = False
worddocument.CommandBars("standard").Controls(2).Enabled = False
worddocument.CommandBars("standard").Controls(4).Enabled = False
worddocument.CommandBars("standard").Controls(5).Enabled = False
100    WordApp.Visible = True

...is open and minimized in the bar of windows .If yes It must maximized in the full screen !!
Programming

Avatar of undefined
Last Comment
dmpuser

8/22/2022 - Mon
0xC0DEB07

WordApp.WindowState = wdWindowStateMaximize

it will work it both cases
ASKER CERTIFIED SOLUTION
0xC0DEB07

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
dmpuser

ASKER
Thanks a lot!!!!!!!!!!!!
0xC0DEB07

You are wellcome
One more thing the WordApp.WidowState thing will work only when its after that line:
Set WordApp = New Word.Application

Have nice day!

Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
dmpuser

ASKER
....opsss....I have try to have the word window in the state of midle dimension do you handstand?

So I speak about when you click no "_" or not "x" in the top right of the window but you click the thirth button..

In this case if I click on my Access2000 button  the window is not maximized :-(((
0xC0DEB07

I guess this is what you need:

WordApp.WindowState = wdWindowStateNormal
dmpuser

ASKER
Infact I have tryied also this solution but the window is not maximized
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
dmpuser

ASKER
ehi here you are???????
dmpuser

ASKER
the window try to open but don't have success
dmpuser

ASKER
the same situation I have in pdf document :-((((
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
0xC0DEB07

>>Infact I have tryied also this solution but the window is not maximized

If you use:
WordApp.WindowState = wdWindowStateMaximize
instead of :
WordApp.WindowState = wdWindowStateNormal

The window will be maximized

>>the same situation I have in pdf document :-((((

I don't know if you can open pdf files with MS Office because I don't use.
As far as I know you cant manipulate Adobe Acrobat with vba.
You may want to open a new question so people who know the answers could help you

Regards
dmpuser

ASKER
in word I have find the solution!!!!
dmpuser

ASKER
.....and I think I have resolved the last problem...but I have a problem when I re-open the pdf file.


 
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
dmpuser

ASKER
ok