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 Autpen()
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 Autpen()
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 Autpen()
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
simple ppa addin with the following code and then load it:
Sub Autpen()
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 Autpen()
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 Autpen()
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