+ Reply to Thread
Results 1 to 12 of 12

Passowrd Protect PPT in VBA code

  1. #1
    Forum Contributor
    Join Date
    04-05-2010
    Location
    Lakewood, IL
    MS-Off Ver
    Excel 2016
    Posts
    384

    Passowrd Protect PPT in VBA code

    I would think this one would be easy, but I found PowerPoint does not have a macro record feature, so I am stuck. I have a VBA program in Excel that creates a PowerPoint file. When complete I save it
    Please Login or Register  to view this content.
    All I am looking to do is save it with a password in cell B17 of the current tab in Excel.

    Any ideas?

  2. #2
    Forum Expert
    Join Date
    02-14-2009
    Location
    .
    MS-Off Ver
    ................
    Posts
    2,840

    Re: Passowrd Protect PPT in VBA code

    It may be PowerPoint VBA, but does this do what you want?

  3. #3
    Forum Contributor
    Join Date
    04-05-2010
    Location
    Lakewood, IL
    MS-Off Ver
    Excel 2016
    Posts
    384

    Re: Passowrd Protect PPT in VBA code

    Hi cytop, For some reason I am not seeing any code?

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Passowrd Protect PPT in VBA code

    You can use the presentations WritePassword property to set a password.
    If posting code please use code tags, see here.

  5. #5
    Forum Contributor
    Join Date
    04-05-2010
    Location
    Lakewood, IL
    MS-Off Ver
    Excel 2016
    Posts
    384

    Re: Passowrd Protect PPT in VBA code

    Quote Originally Posted by Norie View Post
    You can use the presentations WritePassword property to set a password.
    Can you show me an example?

  6. #6
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Passowrd Protect PPT in VBA code

    Assuming PP is a reference to your presentation.
    Please Login or Register  to view this content.

  7. #7
    Forum Contributor
    Join Date
    04-05-2010
    Location
    Lakewood, IL
    MS-Off Ver
    Excel 2016
    Posts
    384

    Re: Passowrd Protect PPT in VBA code

    Quote Originally Posted by Norie View Post
    Assuming PP is a reference to your presentation.
    Please Login or Register  to view this content.
    Thanks I got it to work, but I can still can open the PPT file as read only to get around the password. Is there a different command for that?

  8. #8
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Passowrd Protect PPT in VBA code

    I don't think so, the WritePassword property is really only to prevent the presentation being changed.

  9. #9
    Forum Contributor
    Join Date
    04-05-2010
    Location
    Lakewood, IL
    MS-Off Ver
    Excel 2016
    Posts
    384

    Re: Passowrd Protect PPT in VBA code

    Quote Originally Posted by Norie View Post
    I don't think so, the WritePassword property is really only to prevent the presentation being changed.
    Within PowerPoint you can encrypt the file with a password that is required to open the document. That is what I need but in VBA code.

  10. #10
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Passowrd Protect PPT in VBA code

    I'm sorry but as far as I know it's not possible to set that kind of protection usng VBA.

  11. #11
    Forum Contributor
    Join Date
    04-05-2010
    Location
    Lakewood, IL
    MS-Off Ver
    Excel 2016
    Posts
    384

    Re: Passowrd Protect PPT in VBA code

    Quote Originally Posted by Norie View Post
    I'm sorry but as far as I know it's not possible to set that kind of protection usng VBA.
    Darn that is too bad!!!

  12. #12
    Forum Contributor
    Join Date
    04-05-2010
    Location
    Lakewood, IL
    MS-Off Ver
    Excel 2016
    Posts
    384

    Re: Passowrd Protect PPT in VBA code

    I was lead to believe anything you can do manually in PowerPoint or Excel you can perform in VBA code. Anyone else have any ideas on how to password protect a PPT file with VBA Code?
    Last edited by Bobbbo; 05-25-2016 at 05:28 PM. Reason: Typo

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Protect/Unprotect code causing out of range error in code
    By Petrolcb41 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-02-2010, 02:34 PM
  2. Protect Sheet & Password Protect Code
    By KLahvic in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-13-2009, 04:08 PM
  3. Multi-Passowrd
    By Habib in forum Excel General
    Replies: 2
    Last Post: 01-31-2007, 06:31 PM
  4. Passowrd Protecting
    By TheRook in forum Excel General
    Replies: 4
    Last Post: 06-12-2006, 09:10 AM
  5. How to protect desired area of workbook and protect code.
    By avveerkar in forum Excel General
    Replies: 4
    Last Post: 01-12-2006, 10:44 PM
  6. Replies: 5
    Last Post: 08-09-2005, 11:05 AM
  7. [SOLVED] have put a passowrd onto an excel file and now cannot remember it
    By paul rowe in forum Excel General
    Replies: 3
    Last Post: 06-28-2005, 12:05 PM
  8. Passowrd on a Page in an Excel Sheet
    By mig2000 in forum Excel General
    Replies: 3
    Last Post: 05-06-2005, 08:22 PM

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