Consulting

Results 1 to 3 of 3

Thread: VBA to change the file password and save for a .ppsm file ?

  1. #1
    VBAX Newbie
    Joined
    Nov 2013
    Posts
    2
    Location

    VBA to change the file password and save for a .ppsm file ?

    Hi,

    I have a presentation which I want to save as .ppsm
    The file is protected by a password.

    At the end of the presentation I have created a butto for a Macro
    Now I'm searching for a VBA-code which changes the password and saves the file in current location.
    My intent is that there is a sort of inital password which will be changed (overwrite) to new one and the end of the presentation, and the file is saved as and where it is
    by using the button.

    This is to make sure that the presentation can only be seen once.
    (in the ppt there are different choices and I want to make sure not to give "second try")

    Does anybody have an idea how I could solve this?

    Thanks in advance!

    Regards

  2. #2
    VBAX Master
    Joined
    Feb 2007
    Posts
    2,094
    Location
    The code to do this is straightforward but how are you going to ensure they press the button or even enable macros??
    Sub password()
    ActivePresentation.password = "1234"
    ActivePresentation.Save
    End Sub
    John Wilson
    Microsoft PowerPoint MVP
    Amazing Free PowerPoint Tutorials
    http://www.pptalchemy.co.uk/powerpoi...tutorials.html

  3. #3
    VBAX Newbie
    Joined
    Nov 2013
    Posts
    2
    Location
    Hey, thanks for the quick help!
    I've tried it out and it works quite nicely.
    I'll create the "end" button it a way that, after watching the last slide, the use will feel that has to click it.
    Enable the macros is an issue but I think that if if give the instruction to do so to watch the presentation, this will work.
    The presentation will also possibly be used on a Mac and with OpenOffice and if I'm lucky, the check to enable the marcros or not will not be shown.

    Best regards
    Mark

Posting Permissions

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