+ Reply to Thread
Results 1 to 3 of 3

Download: PowerPoint VBA macro to save numbered and dated versions of workbook files

Hybrid View

  1. #1
    Registered User
    Join Date
    08-29-2011
    Location
    Sunnyvale, CA
    MS-Off Ver
    Excel 2010
    Posts
    2

    Download: PowerPoint VBA macro to save numbered and dated versions of workbook files

    Note: I posted the PowerPoint version rather than the Excel version of my macro. My bad for posting here!

    I created this macro based on a similar Word VBA macro from Graham Mayor that does this for MS Word documents. This macro takes a file like "file.pptx" and saves it as "file-2011-08-29-v001.pptm". Running the macro again increments the file name to "file-2011-08-29-v002.pptm" and saves it.

    Save this code in a VBA module and attach it to a Quick Access Toolbar icon of your choice. It will only work within .pptm files.

    I use this to keep track of versions of presentations when I make changes or when I send to others to make changes.

    Graham Mayor's original MS Word VBA code to so this is at
    http://www.gmayor.com/save_numbered_versions.htm

    Hope it is useful to someone.
    Kurt
    Attached Files Attached Files
    Last edited by KurtShuler; 08-29-2011 at 08:03 PM. Reason: I posted the PowerPoint version rather than the Excel version of my macro. My bad for posting here!

  2. #2
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Download: PowerPoint VBA macro to save numbered and dated versions of workbook fi

    I'd prefer:

    Sub snb()
     With activeworkbook
      If .Path = "" Then Exit Sub
        
      x01 = Split(.Name, IIf(InStr(.Name, "_") = 0, ".", "_"))(0) & Format(Date, "_yyyy-mm-dd-v001.") & CreateObject("scripting.filesystemobject").getextensionname(.Name)
      If InStr(.Name, "_") > 0 Then x01 = Replace(x01, "v001", Format(Right(Split(.Name, ".")(0), 3) + 1, "v000"))
      .SaveAs x01, .FileFormat
     End with
    End Sub



  3. #3
    Registered User
    Join Date
    08-29-2011
    Location
    Sunnyvale, CA
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Download: PowerPoint VBA macro to save numbered and dated versions of workbook fi

    Snb,
    Thanks. I think I can learn from your code, but it will take me awhile to parse it. It's not very human friendly to read and understand.
    Kurt

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1