V
Vic
Hello,
I am trying to automate the creation of building the PPT file and I want to
hide the process. However, I can't seem to get rid of having to activate
the application object which cause a blank PPT screen to flash. The
"Unknown Member" seems to be what has to be identified but how?? Following
is the code with comments attached to what I've tried.
Thank you very much, Vic
Set oPwrpnt = CreateObject("Powerpoint.application")
' oPwrpnt.Visible = False <<=== This fails Application (unknown
member) : Invalid request. Hiding the application window is not allowed.
oPwrpnt.Activate <<== will flash a blank PPT screen
'oPwrpnt.WindowState = ppWindowMinimized <<== Fails if the above
is commented out
deffilename = App.Path & "\" & main.cboChartSelection &
"\MyTemplate.pptxm"
'following statement fails with the error: 'Presentations (unknown
member) : Invalid request. The PowerPoint Frame window does not exist.
' if oPwrpnt.Activate is commented out
Set OpwrPresent =
oPwrpnt.Presentations.Open(deffilename).Slides(1)
'Also the following fails with the same error as above
Set OpwrPresent = oPwrpnt.Presentations.Open(deffilename,
False).Slides(1)
I am trying to automate the creation of building the PPT file and I want to
hide the process. However, I can't seem to get rid of having to activate
the application object which cause a blank PPT screen to flash. The
"Unknown Member" seems to be what has to be identified but how?? Following
is the code with comments attached to what I've tried.
Thank you very much, Vic
Set oPwrpnt = CreateObject("Powerpoint.application")
' oPwrpnt.Visible = False <<=== This fails Application (unknown
member) : Invalid request. Hiding the application window is not allowed.
oPwrpnt.Activate <<== will flash a blank PPT screen
'oPwrpnt.WindowState = ppWindowMinimized <<== Fails if the above
is commented out
deffilename = App.Path & "\" & main.cboChartSelection &
"\MyTemplate.pptxm"
'following statement fails with the error: 'Presentations (unknown
member) : Invalid request. The PowerPoint Frame window does not exist.
' if oPwrpnt.Activate is commented out
Set OpwrPresent =
oPwrpnt.Presentations.Open(deffilename).Slides(1)
'Also the following fails with the same error as above
Set OpwrPresent = oPwrpnt.Presentations.Open(deffilename,
False).Slides(1)