Save related procedures in class Presentation (PowerPoint VBA)

This page presents procedures from class Presentation related to the theme Save: AutoSaveOn, CanCheckIn, CheckIn, CheckInWithVersion, Save, SaveAs, SaveCopyAs, SaveCopyAs2 and Saved

AutoSaveOn

True if the edits in the presentation are automatically saved.

When a new presentation is created, the default value for the AutoSaveOn property is False, the property is disabled, and the user's changes will need to be saved manually. However, if the presentation is hosted on the cloud (that is, OneDrive, OneDrive for Business, or SharePoint Online), then the AutoSaveOn property defaults to True and the edits in the specified presentation are automatically saved. If a cloud-hosted presentation is shared with other users, then their changes will also be automatically merged into the user's local copy when AutoSaveOn is True. Table 1 AutoSaveOn behavior

ActivePresentation.AutoSaveOn = True

CanCheckIn

Returns True if Microsoft PowerPoint can check in a specified presentation to a server.

To take advantage of the collaboration features built into PowerPoint, you must store presentations on a Microsoft SharePoint Portal Server.

Dim booCanCheckIn As Boolean
booCanCheckIn = ActivePresentation.CanCheckIn()

CheckIn

Returns a presentation from a local computer to a server, and sets the local file to read-only so that it cannot be edited locally.

To take advantage of the collaboration features built into Microsoft PowerPoint, presentations must be stored on a Microsoft Office SharePoint Portal Server.

Syntax : expression.CheckIn (SaveChanges, Comments, MakePublic)

Sub CheckInPresentation(strPresentation As String)
    If Presentations(strPresentation).CanCheckIn = True Then
        Presentations(strPresentation).CheckIn
        MsgBox strPresentation & " has been checked in."
    Else
        MsgBox strPresentation & " cannot be checked in at this time.  Please try again later."
    End If
End Sub

Arguments

The following arguments are optional

SaveChanges (Boolean) - True saves the presentation to the server location. The default value is False.

Comments (String) - Comments for the revision of the presentation being checked in (only applies if SaveChanges equals True).

MakePublic (Boolean) - True allows the user to perform a publish on the presentation after being checked in. This submits the document for the approval process, which can eventually result in a version of the presentation being published to users with read-only rights to the presentation (only applies if SaveChanges equals True).

CheckInWithVersion

Returns a presentation from a local computer to a server, and sets the local file to read-only so that it cannot be edited locally.

To take advantage of the collaboration features built into Microsoft PowerPoint, you must store presentations on a Microsoft SharePoint Portal Server. For the VersionType parameter, you can also pass a constant from the PpCheckInVersionType enumeration.

Syntax : expression.CheckInWithVersion (SaveChanges, Comments, MakePublic, VersionType)

ActivePresentation.CheckInWithVersion

Arguments

The following arguments are optional

SaveChanges (Boolean) - True saves the presentation to the server location. The default value is False.

Comments (String) - Comments for the revision of the presentation being checked in (only applies if SaveChanges equals True).

MakePublic (Boolean) - True allows the user to perform a publish on the presentation after being checked in. This submits the document for the approval process, which can eventually result in a version of the presentation being published to users with read-only rights to the presentation (only applies if SaveChanges equals True).

VersionType (Single) - Version number of the presentation.

Save

Saves the specified presentation.

Use the SaveAs method to save a presentation that has not been previously saved. To determine whether a presentation has been saved, test for a nonempty value for the FullName or Path property. If a document that has the same name as the specified presentation already exists on disk, that document will be overwritten. No warning message is displayed. To mark the presentation as saved without writing it to disk, set the Saved property to True.

ActivePresentation.Save

SaveAs

Saves a presentation that's never been saved, or saves a previously saved presentation under a different name.

The FileFormat parameter value can be one of these PpSaveAsFileType constants. The default is ppSaveAsDefault. For a complete list of constants, see PpSaveAsFileType Enumeration.

Syntax : expression.SaveAs (FileName, FileFormat, EmbedTrueTypeFonts)

With Application.ActivePresentation 
    .SaveCopyAs "New Format Copy" 
    .SaveAs "Old Format Copy", ppSaveAsPowerPoint4 
End With

Arguments

The following argument is required

FileName (String) - Specifies the name to save the file under. If you don't include a full path, PowerPoint saves the file in the current folder.

The following arguments are optional

FileFormat (PpSaveAsFileType) - Specifies the saved file format. If this argument is omitted, the file is saved in the default file format (ppSaveAsDefault).

Here you can find possible values for PpSaveAsFileType.

EmbedTrueTypeFonts - Office.MsoTriState

SaveCopyAs

Saves a copy of the specified presentation to a file without modifying the original.

The FileFormat parameter value can be one of these PpSaveAsFileType constants. The default is ppSaveAsDefault.

Syntax : expression.SaveCopyAs (FileName, FileFormat, EmbedTrueTypeFonts)

Arguments

The following argument is required

FileName (String) - Specifies the name to save the file under. If you don't include a full path, PowerPoint saves the file in the current folder.

The following arguments are optional

FileFormat (PpSaveAsFileType) - The file format.

Here you can find possible values for PpSaveAsFileType.

EmbedTrueTypeFonts (Office.MsoTriState) - Specifies whether TrueType fonts are embedded.

SaveCopyAs2

Saves a copy of the specified presentation to a file without modifying the original.

The FileFormat parameter value can be one of these PpSaveAsFileType constants. The default is ppSaveAsDefault.

Syntax : expression.SaveCopyAs2 (FileName, FileFormat, EmbedTrueTypeFonts, ReadOnlyRecommended)

Arguments

The following argument is required

FileName (String) - Specifies the name to save the file under. If you don't include a full path, PowerPoint saves the file in the current folder.

The following arguments are optional

FileFormat (PpSaveAsFileType) - The file format.

Here you can find possible values for PpSaveAsFileType.

EmbedTrueTypeFonts (Office.MsoTriState) - Specifies whether TrueType fonts are embedded.

ReadOnlyRecommended (Office.MsoTriState) - Specifies whether the file should be marked as ReadOnlyRecommended.

Saved

Determines whether changes have been made to a presentation since it was last saved.

If the Saved property of a modified presentation is set to msoTrue, the user won't be prompted to save changes when closing the presentation, and all changes made to it since it was last saved will be lost. The value of the Saved property can be one of these MsoTriState constants.

ActivePresentation.Saved = msoTrue