> thanks for that. I was guessing that was the case cos I din't have
> any probs doing it in Excel (which is where I learned my VB...via
[quoted text clipped - 4 lines]
> chance have I got with other users.....there are other values in the
> registry though that might give me what i'm looking for.
I'm sorry, it wasn't "(Default)" but an actual string entry named "Default" at that
branch that was set. I suppose it doesn't surprise me if it's empty, though, if
you've never set it. PowerPoint would probably use the MyDocuments folder in that
case, no?
> However, I've looked at other possible workrounds. Since my boss
> wants as many apps as possible migrated to VB.NET (don't ask why? its
> a boss thing),
LOL! That'd be funny enough, were they just VB, but given the Office aspect of it
that's just downright hilarious. (Tell him I said so, if it helps. <g>)
> I've looked at the options there and found I can use a
> "systeminformation.username" function to help build what would be the
[quoted text clipped - 4 lines]
> important thing ..... so maybe VB.NET has its uses after all (all I
> need to do now is translate the rest of the 650 lines of code!!)
Oh, don't be silly. <g> There are Win32 functions designed to get all those special
folders. For example, from a CSysFolders class of mine:
Public Property Get Path(ByVal CSIDL As CSIDL_VALUES, Optional Default As Boolean
= True, Optional ForceCreation As Boolean = False) As String
Dim Buffer As String
Dim pidl As Long
Dim nRtn As Long
' Create buffer for return results.
Buffer = Space$(MAX_PATH)
' Branch based on what tools we have...
If m_Enhanced Then
' Tell system to create, if necessary
If ForceCreation Then
CSIDL = CSIDL Or CSIDL_FLAG_CREATE
End If
' Grab requested system folder.
nRtn = SHGetFolderPath(0&, CSIDL, 0&, Abs(Default), Buffer)
Select Case nRtn
Case S_OK
' Return requested system folder.
Path = TrimNull(Buffer)
Case S_FALSE
' Folder either doesn't exist or isn't supported.
Debug.Print "The CSIDL in nFolder is valid, but the folder does not
exist."
Case E_INVALIDARG
' OS doesn't support this folder. Unfortunately, this
' result isn't returned unless CSIDL_FLAG_CREATE is
' specified in SHGetFolderPath call.
Debug.Print "The CSIDL in nFolder is not valid."
End Select
Else
' Use old-fashioned method to get system folder.
nRtn = SHGetSpecialFolderLocation(0&, CSIDL, pidl)
Select Case nRtn
Case S_OK
' Retrieve actual path, given the pidl.
If SHGetPathFromIDList(pidl, Buffer) Then
Path = TrimNull(Buffer)
End If
Call CoTaskMemFree(pidl)
Case E_INVALIDARG
' OS doesn't support this folder.
Debug.Print "The CSIDL in nFolder is not valid."
Case Else
' Some sort of OLE-defined error code
Debug.Print "OLE error: &h" & Hex$(nRtn)
End Select
End If
End Property
Pass that CSIDL_PERSONAL (&H5), and you'll get the exact path the user has designated
for this. You need to beware that it's not at all always under "\Documents and
Settings" either! Mine is set to C:\Docs, for example.
Later... Karl

Signature
[Microsoft Basic: 1976-2001, RIP]
>>> I cannot hard-code the path/directory to include it in the
>>> ActivePresentation.SaveAs line because I have multiple users who
[quoted text clipped - 24 lines]
>> --
>> [Microsoft Basic: 1976-2001, RIP]
mabond - 31 Jan 2005 22:23 GMT
Karl
thnaks for this ........ much appreciate your help
Michael Bond
> > thanks for that. I was guessing that was the case cos I din't have
> > any probs doing it in Excel (which is where I learned my VB...via
[quoted text clipped - 116 lines]
> >> --
> >> [Microsoft Basic: 1976-2001, RIP]