Consulting

Results 1 to 6 of 6

Thread: Save current slide only, no embedded fonts

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #3
    My nad:

    Here is the corrected code as per your request John.
    I think the problem narrows down to the path. It seems use a Onedrive path as the current folder's bath which get's jumbled up with the rest of the path I add. I can't find the file at the location it says it saved the file.

    Your thougts?

    Thanks again

    Option Explicit    
    
    Sub SaveCurrentSlide()
        Dim CurrentSlide As String
        Dim tPath As String
        Dim tFilename As String
        CurrentSlide = ActiveWindow.View.Slide.SlideIndex
        On Error GoTo errorhandler
        If ActiveWindow.ViewType = ppViewNormal Then ActiveWindow.Panes(1).Activate
        With ActivePresentation
            ' Build a unique filename and save a coy of the now single-slide presentation
            tPath = .Path
            tFilename = tPath & "\" & Left(.Name, InStrRev(.Name, ".") - 1) & " [slide " & CurrentSlide & "].pptx"
            ActivePresentation.SaveAs FileName:=tFilename, _
            FileFormat:=ppSaveAsPresentation, EmbedTrueTypeFonts:=msoFalse
        End With
        ' Give feedback to the user
        MsgBox "Current slide exported to:" & vbNewLine & tFilename, vbOKOnly, "Export Current Slide - Export Complete"
        On Error GoTo 0
        Exit Sub
        errorhandler:
        Debug.Print Err, Err.Description
        Resume Next
    End Sub
    Last edited by Aussiebear; 04-07-2025 at 04:26 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •