Results 1 to 3 of 3
  1. #1
    5 Star Lounger
    Join Date
    Mar 2001
    Location
    New York, NY
    Posts
    861
    Thanks
    0
    Thanked 10 Times in 9 Posts

    PowerPoint SaveAs Dialog

    I want to display the SaveAs dialog box in PowerPoint 2010. I also want to set the default folder. I'm using the following code, but the folder remains the folder of the open presentation. What must I do differently, or is there a better way to approach this? Thanks.

    Code:
    Dim sDir As String
        sDir = "H:\Data\PowerPoint\"
        
        ChDir sDir
        
        With Application.FileDialog(msoFileDialogSaveAs)
            
            .Show
            
        End With

  2. #2
    Super Moderator
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    3,548
    Thanks
    3
    Thanked 149 Times in 142 Posts
    You were very close - this seems to work for me?
    Code:
      Dim sDir As String
      sDir = "H:\Data\PowerPoint\"
      With Application.FileDialog(msoFileDialogSaveAs)
          .InitialFileName = sDir
          .Show
      End With
    If sDir ends with a backslash the default filename is empty. If it ends without the slash then the last parameter is the default filename.
    Last edited by Andrew Lockton; 2014-05-02 at 02:26.
    Andrew Lockton, Chrysalis Design, Melbourne Australia

  3. #3
    5 Star Lounger
    Join Date
    Mar 2001
    Location
    New York, NY
    Posts
    861
    Thanks
    0
    Thanked 10 Times in 9 Posts
    Thank you. I was looking for .Name, which is what I use in Word. I should have looked more closely... I would have seen .InitialFileName, which is rather self-explanatory. Thanks again.

Posting Permissions

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