Supercharge your PowerPoint productivity with
Supercharge your PPT Productivity with PPTools - Click here to learn more.

PPTools

Image Export converts PowerPoint slides to high-quality images.

PPT2HTML exports HTML even from PowerPoint 2010 and 2013, gives you full control of PowerPoint HTML output, helps meet Section 508 accessibility requirements

Merge Excel data into PowerPoint presentations to create certificates, awards presentations, personalized presentations and more

Resize your presentations quickly and without distortion

Language Selector switches the text in your presentation from one language to another

FixLinks prevents broken links when you distribute PowerPoint presentations

Shape Styles brings styles to PowerPoint. Apply complex formatting with a single click.

Prep4PDF preserves interactivity in PowerPoint presentations when you convert to PDF

Fill the MRU (Most Recently Used) list with bogus file names

Problem

PowerPoint shows the most recently used (MRU) files in a list on the File menu.
You may want to hide the names of recently used files for one reason or another.
Or you may want to prevent PPT from trying to access a drive (floppy, CD, network share) that's no longer available.

Solution

The following simple-minded little macro simply creates a new blank presentation then saves it multiple times as 1.ppt, 2.ppt ... 9.ppt, then closes the file.

That's enough to "stuff" the MRU list with bogus filenames, as it never contains more than 9 entries.

In PowerPoint 97, anyhow. But PowerPoint 2000 and later outsmart us: when macro code saves files, they don't get added to the MRU list. So we have two versions of this little macro, one for 2000 and up, one for 97.

In 2000 and up, you'll need to run the macro to create the files, then manually save and close each one before it appears on the MRU list.

Hint: use Ctl+S to Save, then Alt+F, C to close each file.

Sub StuffTheMRU2000()
' Use this with PPT 2000 and later

    Dim DummyFilePath As String
    Dim x As Long
    Dim oPres As Presentation

    ' Edit this as you wish, but it MUST end with backslash
    ' and it should always be a path on the local hard drive
    DummyFilePath = "c:\temp\"

    ' save it nine times to stuff the MRU list
    For x = 1 To 9
        ' Create a new presentation
        Set oPres = Presentations.Add(msoTrue)
        ' Add a slide to it
        Call oPres.Slides.Add(1, ppLayoutBlank)
        ' Save it so it has a name
        ActivePresentation.SaveAs FileName:=DummyFilePath & "Dummy" & CStr(x) & ".ppt"
    Next

    Set oPres = Nothing

    MsgBox ("Done!" & vbCrLf _
        & "Now save each file once again manually before closing it.")

End Sub

Sub StuffTheMRU97()
' Use this for PowerPoint 97

Dim ThePath as String
Dim i as Integer

' Edit this as you wish:
ThePath = "C:\"
' For example
' ThePath = "C:\BogusFiles\NonEntity" would give C:\BogusFiles\NonEntity1.ppt and so on

' Create a new presentation
    Presentations.Add WithWindow:=msoTrue
    ActiveWindow.View.GotoSlide Index:=ActivePresentation.Slides.Add(Index:=1, Layout:=ppLayoutTitle).SlideIndex

For i = 1 to 9
    ActivePresentation.SaveAs FileName:=ThePath & cstr(i) & ".ppt"
Next i

' Close the presentation
ActiveWindow.Close

' Delete the files
On error resume next
For i = 1 to 9
  Kill(ThePath & Cstr(i) & ".ppt")
Next i

End Sub

See How do I use VBA code in PowerPoint? to learn how to use this example code.

Search terms:


Did this solve your problem? If so, please consider supporting the PPT FAQ with a small PayPal donation.
Page copy protected against web site content infringement by Copyscape Contents © 1995 - 2014 Stephen Rindsberg, Rindsberg Photography, Inc. and members of the MS PowerPoint MVP team. You may link to this page but any form of unauthorized reproduction of this page's contents is expressly forbidden.
Español    Deutsch    Français    Português    Italiano    Nederlands    Greek    Japanese    Korean    Chinese

Supercharge your PPT Productivity with PPTools

content authoring & site maintenance by
Friday, the automatic faq maker (logo)
Friday - The Automatic FAQ Maker

Fill the MRU (Most Recently Used) list with bogus file names
http://www.pptfaq.com/FAQ00373_Fill_the_MRU_-Most_Recently_Used-_list_with_bogus_file_names.htm
Last update 07 June, 2011
Created: