(simplified) PPT changes window size upon open

  • Thread starter Thread starter c mateland
  • Start date Start date
C

c mateland

1) I want PPT v2000 to startup by opening a certain file, so I make a
simple ppa addin with the following code and then load it:

Sub Auto_Open()
Application.Presentations.Open FileName:="c:\testopen.ppt"
End Sub

2) ... But this version refuses to open a file unless I add the Visible
property like this:

Sub Auto_Open()
Application.Visible = True
Application.Presentations.Open FileName:="c:\testopen.ppt"
End Sub

3) ... It now opens the file, but also inexplicitly changes the program
window from maximized to restored, so I add another line of code to
maximize the window back.

Sub Auto_Open()
Application.Visible = True
Application.Presentations.Open FileName:="c:\testopen.ppt"
Application.WindowState = ppWindowMaximized
End Sub

4) ... But PPT totally ignores the command and leaves the window
restored.

5) ... Is this a known bug in v2000, being later versions don't behave
this way, or can someone shed light on a better way to code this?

Thank you,
Chuck
 
Do think I'd have better luck for help if I posted such VBA techy
questions in another group such as
microsoft.public.office.developer.vba? Would this question be beneath
them?

-Chuck
 
Wow, bad typo there. I meant it as quesion not a statement...

Do [you] think I'd have better luck for help if I ...?
 
C mateland said:
Wow, bad typo there. I meant it as quesion not a statement...

No problem, the meaning was obvious.

Can't hurt to post the question in another group (generally best to cross-
rather than multi-post).

Spent some time poking at this yesterday but didn't come up with anything
useful.
Do [you] think I'd have better luck for help if I ...?

c said:
Do think I'd have better luck for help if I posted such VBA techy
questions in another group such as
microsoft.public.office.developer.vba? Would this question be beneath
them?

-Chuck
 
Back
Top