Is there a means in PowerPoint VBA to determine the default file save
location?
Better yet, is there a means to change that default location?
Is there a means in PowerPoint VBA to determine the default file save
location?
Better yet, is there a means to change that default location?
Hi Howard,
If the user has not alterd this path then it is by default %User%MyDocuments
But this no good for you because a user could have changed this and what about foreign languages....
Powerpoint is the least Robust Object model of them all and off course it doesn't provide what you want it to...(A simple Options.DefaultFileLocation = "bla")
That would be to easy.....
If you're up for it then you can off course to you're API Call thing on this challenge (To the options dialog) but there are Two Caveat'sI can think off)
* Language
* Office 97 the file box is on the Advanced tab (>97 the box is on the Save tab)
Don't envy you doing that.....
Another possibility is going into the registry and deal with the sucker over there...(not for everybody....be carefull for whome it concerns)
It's just a guess but PP most hold that value somewhere normaly it's in the registry. (Not shure)
I'll do a search for you later if there are better options!
_________
Groetjes,
Joost Verdaasdonk
M.O.S. Master
Mark your thread solved, when it has been, by hitting the Thread Tools dropdown at the top of the thread.
(I don't answer questions asked through E-mail or PM's)
Best option is the registry, that's easy to do.Originally Posted by MOS MASTER
But I've decided to just use App.Path in VB 6 for my sample code that sets the VBA passwords.
Too much trouble to hop around when testing if a different directory were to be used for Access, Excel, Powerpernt and Word. Haven't decided yet whether to add Outook.
The password code is common to all, but there's a different front-end for each app, each in a separate command button's code. Just needs a short front end for Outlook.
Oh well, I've been "awake" for about 26 hours, my stomach is growling, gotta eat then try to find my bed.
Hi,
Yeah PP trully sucks in it's Object model..still hoping on a better sollution then you're App.path...(I'll search tommorow)
For now nighty night to yah!
_________
Groetjes,
Joost Verdaasdonk
M.O.S. Master
Mark your thread solved, when it has been, by hitting the Thread Tools dropdown at the top of the thread.
(I don't answer questions asked through E-mail or PM's)
Best solution may be to retrieve, say, the path from powerpernt's recently used files registry key.
Otherwise, powerpernt seems to default to the Office11 directory, a really dumb default!.
For a VB 6 .exe, App.Path is fine for my sample code, tho noyt in a real app.
Hi Howard,
If the key is in Recent used file list than you could grab it from there to solve you're question (Didn't check that) if not then I wouldn't go for that approach.
I don't agree that it defaults to the Office(8,9,10 or 11) folder at al my machines it defaults to the MyDocuments folder! (Couldn't explain why yours goes somewhere else)
If the right key is not under Recent used file list then I would choose to get the default file save location from Word or any other app you could read it from.
Most people save there documents in the same Root folder and if you can't find the true default than this would be my second best option!
_________
Groetjes,
Joost Verdaasdonk
M.O.S. Master
Mark your thread solved, when it has been, by hitting the Thread Tools dropdown at the top of the thread.
(I don't answer questions asked through E-mail or PM's)
Where is that documented?Originally Posted by MOS MASTER
I do not understand. If there's a defined default, I can always get that location from the registry, or somewhere. What "I;am asking is where is that default defined.But this no good for you because a user could have changed this and what about foreign languages....
I do not see anything in the registry.
THe setting has to be saved somewhere, but powerpernt vba may just not let us have access, no pun intended, in the same that access 97 vba is braindead wth regard to vbproject objects.Powerpoint is the least Robust Object model of them all and off course it doesn't provide what you want it to...(A simple Options.DefaultFileLocation = "bla")
Hi,
Have not looked for any documentation on that. It's just a fact that it is on al of my machines.
I also went in the registry and couldn't find it just like you. So that's why i suggested you use the settings of Word as the next best thing!
_________
Groetjes,
Joost Verdaasdonk
M.O.S. Master
Mark your thread solved, when it has been, by hitting the Thread Tools dropdown at the top of the thread.
(I don't answer questions asked through E-mail or PM's)
4 me own purposes, it does not matter what is te default, it matters only when i'm putting out general code, as i did today. i've never bee4 released powerpoint code.Originally Posted by MOS MASTER
it would not be good to have powerpernt dump things in, say word's default directory, unless the user specifically chose this. that's why most apps have a means to specify such defaults, if not thru the gui, then via registry setting. powerpernt seems to have braindead vba.
Hi,
True PP does have Braindead Object model!
But I can't believe there is no way to gatter this information! I'll do another search tommorow..
And yeas the Word option was a second best thing..witch sucks just as hard offcourse!
Aah this merging feature of the board!
Ok changed the default via the Options/Save tab en looked in the Registry.
This the key I found:
HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\PowerPoint\RecentFolderLis t
Under the Default, RegExpandSZ I found the Path I just altered. (altered it again and did a registry refresh it changed so it?s the good path)
Seams you can use this one for you?re query?
Must be honest here...it does seam a strange place for this key...the options section would be much easier to find..
_________
Groetjes,
Joost Verdaasdonk
M.O.S. Master
Mark your thread solved, when it has been, by hitting the Thread Tools dropdown at the top of the thread.
(I don't answer questions asked through E-mail or PM's)
I'll vote for Publisher, actually.Originally Posted by MOS MASTER
Regards, Zack Barresse
Check out the KB! :|: BOARD TAGS: WHAT ARE THEY AND HOW DO I USE THEM
What is a Microsoft MVP? | Free Microsoft Courses | My Book on Excel Tables
Me 2.Originally Posted by firefytr
I don'tOriginally Posted by firefytr
If Howard's question was about Publisher then we could beg the differ in showing Publisher does have this little option..(Even in the right Property)
[VBA]
Sub PublicationPath()
MsgBox Application.Options.PathForPublications
End Sub
[/VBA]
No my vote for all time VBA Loser must go to InfoPath
_________
Groetjes,
Joost Verdaasdonk
M.O.S. Master
Mark your thread solved, when it has been, by hitting the Thread Tools dropdown at the top of the thread.
(I don't answer questions asked through E-mail or PM's)
My vote was based on what I recalled about the overall VBA support in Publisher. Of course, I have not checked in a while, but then who says the electorate must be informed?Originally Posted by MOS MASTER
Nobody Howard...he should do what ever feels right to him!Originally Posted by Howard Kaikow
_________
Groetjes,
Joost Verdaasdonk
M.O.S. Master
Mark your thread solved, when it has been, by hitting the Thread Tools dropdown at the top of the thread.
(I don't answer questions asked through E-mail or PM's)
Hi Howard,
A bit slow in noticing this thread...
if your looking for a common/consistant place to save files across apps then you could use the FileSystemObject (or WSH) to get the users homedrive and directory (which I believe is how PPT sets it's default on install, though that's more of a hunch than anyhting)[VBA]Dim fs
Set fs = CreateObject("Scripting.FileSystemObject")
MsgBox Environ("HOMEDRIVE") & Environ("HOMEPATH")[/VBA] I frequently use this (and the "TEMP" and "TMP" settings for temp files) in distributed apps/addins to keep things simple
Last edited by Killian; 05-06-2005 at 07:09 AM. Reason: to correct my appalling spelling
K :-)
i was looking for powerpernt's default location, not for temp files.Originally Posted by Killian
i won't use the scripting library in code/exe/dll to be used by others as hysterically, ooops, historically, auntie-virus software has picked on use of the scripting library.
Hi Howard,Originally Posted by Howard Kaikow
Am I correct that you won't settle for the Powerpoint path under registry key:
HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\PowerPoint\RecentFolderLis t?
Or have you found another approach yet..or dropped the thing entirely!
_________
Groetjes,
Joost Verdaasdonk
M.O.S. Master
Mark your thread solved, when it has been, by hitting the Thread Tools dropdown at the top of the thread.
(I don't answer questions asked through E-mail or PM's)
recentfolderlist is not satisfactory for a default location.Originally Posted by MOS MASTER
i would choose the default location based on the need of the app on a case by case basis.
Yes I said that before because I didn't understand yet that it holds the true value of the default filesave path that the user gave in Option/Save tab!Originally Posted by Howard Kaikow
I thought that recentfolderlist was some kind of MRU location and I agree that wouldn't tell you so much!
Under the Default, (Type) RegExpandSZ key you can find the default file save path and I've checked this from 2000/2003 so this is the answer to your question....
So am I not understanding you or are you looking for something else than your orginal question? (Yes I know I'm a nag but I'm sure I'm missing something here)
_________
Groetjes,
Joost Verdaasdonk
M.O.S. Master
Mark your thread solved, when it has been, by hitting the Thread Tools dropdown at the top of the thread.
(I don't answer questions asked through E-mail or PM's)