Results 1 to 8 of 8
  1. #1
    Star Lounger
    Join Date
    Nov 2005
    Location
    London, Gtr London, United Kingdom
    Posts
    88
    Thanks
    0
    Thanked 0 Times in 0 Posts

    ChangeFileOpenDirectory (VBA/Powerpoint/2000)

    Sorry for all the questions today!!

    But one last one. I know that in Word you can use the ChangeFileOpenDirectory to help direct a user to where you want a document saved, but is there a powerpoint equivalent?

    Cheers

    Thom

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: ChangeFileOpenDirectory (VBA/Powerpoint/2000)

    PowerPoint VBA is rather limited in many respects. As far as I know, there is no PowerPoint equivalent.

  3. #3
    Star Lounger
    Join Date
    Nov 2005
    Location
    London, Gtr London, United Kingdom
    Posts
    88
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: ChangeFileOpenDirectory (VBA/Powerpoint/2000)

    Maybe there could be a work around. I've created code to open a new presentation, but because I want to keep the "Drawing Guides" setup that I want the user to see, i'm having the code open a read-only ppt rather than a pot (as pots don't save guide information). but when the user goes to save the file, it remains in the location of the ppt (i.e. crogram filesetc). which I don't want as it seems a bit messy.. Obviously the user can then navigate to a more sensible place to save the file, but you can't always trust them to. Any ideas of a possible "cheat" to get round this would be greatly appreciated.

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: ChangeFileOpenDirectory (VBA/Powerpoint/2000)

    You can use some Windows API code to show your own Save As dialog, and specify a folder. Download and open the attached demo to see it work; make sure that macro security is not set to High.

  5. #5
    Star Lounger
    Join Date
    Nov 2005
    Location
    London, Gtr London, United Kingdom
    Posts
    88
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: ChangeFileOpenDirectory (VBA/Powerpoint/2000)

    Thanks Hans.

    Wow, that's an awful lot of code for something seeming so simple!!

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: ChangeFileOpenDirectory (VBA/Powerpoint/2000)

    In Office XP (2002) and 2003, there's a built-in FileDialog object that provides the same functionality, but it's lacking in Office 2000.

  7. #7
    Star Lounger
    Join Date
    Nov 2005
    Location
    London, Gtr London, United Kingdom
    Posts
    88
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: ChangeFileOpenDirectory (VBA/Powerpoint/2000)

    It nearly works a dream, but for some reason it doesn't recognise if it's just about to overwrite a file with an existing name!!

  8. #8
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: ChangeFileOpenDirectory (VBA/Powerpoint/2000)

    You have to specify that in the code: change the line

    .Flags = cdlHideReadOnly Or cdlPathMustExist

    to

    .Flags = cdlHideReadOnly Or cdlPathMustExist Or cdlOverwritePrompt

Posting Permissions

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