(simplified) PPT changes window size upon open

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
 
C

c mateland

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
 
C

c mateland

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

Do [you] think I'd have better luck for help if I ...?
 

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