Open a .pps from VBA, then exit slideshowview without closing the file

  • Thread starter Thread starter Martin Stender
  • Start date Start date
M

Martin Stender

Hi all,

I'm having a problem with the above.

To be precise, I need to - from VBA - open a .pps file and take it to
edit-mode.

It's a part of something larger, but it's generally like this:

(this could be in a module, triggered by a commandbutton)

Dim thepres As Presentation

file = "C:\test.pps"
Set thepres = Presentations.Open(file, msoFalse, msoFalse, msoTrue)
With thepres
.SlideShowWindow.View.Exit
End With
End Sub

But because it's a .pps file, the file closes after the 'View.Exit'
part - and I need it to remain open in edit mode.

Any suggestions?

Best regards
Martin
 
Hi all,

I'm having a problem with the above.

To be precise, I need to - from VBA - open a .pps file and take it to
edit-mode.

Rename the file to whatever.PPT then open it normally.

Dim sOriginalName as String
sOriginalName = "C:\test.pps"
Name soriginalname As "c:\temp.ppt"
' do your stuff
' then rename back
Name "c:\temp\ppt" as sOriginalName

Or use FileCopy to copy the .PPS to a new file with .PPT extension
Do your work on it
If no errors/problems then
Kill the original file
Filecopy the new file back to original name
 
Thank you both!

Steve, good idea, but I must admit I went with Shyams suggestion this
time.

Now, I must start to give more back to this great group myself...

Martin
 
Thank you both!

Steve, good idea, but I must admit I went with Shyams suggestion this
time.

Not a problem ... if I'd remembered it, I'd have pointed you there myself. ;-)
Now, I must start to give more back to this great group myself...

You'd be very welcome here, sir. Please do.
 
Back
Top