Consulting

Results 1 to 3 of 3

Thread: Save file in destinated folder using VBA

  1. #1

    Save file in destinated folder using VBA

    Dear all,

    I'm looking for a code with which I can save I can save a powerpoint with a timestamp in a predefined folder. So it should be like:

    - I press a shortcut
    - I get a pop up box
    - I press enter and file is saved.

    I created an excel file for this (see below) but cant find how to do this in powerpoint. Anybody help on how I can do this?

    Dear regards, Marc


    Sub SAVEINFOLDER()

    Dim FileName As String


    FileName = InputBox("Geef hier je bestandsnaam aan")
    FullName = team & "FILE.xls"



    Const Path = "C:\Documents and Settings\aa471714\Desktop\TEST\"
    ThisWorkbook.SaveAs Path & FullName

    End Sub

  2. #2
    VBAX Guru mancubus's Avatar
    Joined
    Dec 2010
    Location
    "Where I lay my head is home" :D
    Posts
    2,644
    welcome to the forum.

    this may get you started:

    http://www.vbaexpress.com/forum/show...e-presentation
    PLS DO NOT PM; OPEN A THREAD INSTEAD!!!

    1) Posting Code
    [CODE]PasteYourCodeHere[/CODE]
    (or paste your code, select it, click # button)

    2) Uploading File(s)
    Go Advanced / Attachments - Manage Attachments / Add Files / Select Files / Select the file(s) (multiple files can be selected while holding Ctrl key) / Upload Files / Done
    Replace company specific / sensitive / confidential data. Include so many rows and sheets etc in the uploaded workbook to enable the helpers visualize the data and table structure. Helpers do not need the entire workbook.

    3) Testing the Codes
    always back up your files before testing the codes.

    4) Marking the Thread as Solved
    from Thread Tools (on the top right corner, above the first message)

  3. #3
    VBAX Master
    Joined
    Feb 2007
    Posts
    2,093
    Location
    You cannot use shortcuts in PPt

    Tryt this code though

    Sub SAVEINFOLDER()

    Dim FileName As String
    Dim saveName As String
    Dim timeStamp As String

    FileName = InputBox("Geef hier je bestandsnaam aan")
    saveName = FileName & ".ppt"
    timeStamp = Month(Now) & "-" & Day(Now) & "_" & Hour(Now) & "-" & Minute(Now) & "_"
    Const Path = "C:\Documents and Settings\aa471714\Desktop\TEST\"
    ActivePresentation.SaveAs Path & timeStamp & saveName
    End Sub
    John Wilson
    Microsoft PowerPoint MVP
    Amazing Free PowerPoint Tutorials
    http://www.pptalchemy.co.uk/powerpoi...tutorials.html

Tags for this Thread

Posting Permissions

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