Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2009
    Location
    Massachusetts
    Posts
    10

    Unanswered: Need to refer to "My Documents"

    Hello,

    I was looking for a way to programmatically take my user to a dialog box where he could locate a file to import. I found PBALDY's link to "API: Call the standard Windows File Open/Save dialog box" which works nicely, thank you very much, but I'm looking to set the initial directory to "My Documents" on the user's C: drive. I've tried "C:\My Documents", but that doesn't work. The sample code uses "C:\" as the initial directory.

    Sorry if this is a silly question.

    Pete

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    c:\my documents
    may fail because its not the proper path to the file or filename. IIRC windows uses a directory called documents but aliased as my documents
    try: c:\users\<username\documents
    I'd rather be riding on the Tiger 800 or the Norton

  3. #3
    Join Date
    Nov 2009
    Location
    Massachusetts
    Posts
    10
    When you say <username>, do you mean "<username>" or "jsmith"?

    This is an application that could be used by many users.

    Thanks and HNY!

  4. #4
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    replace the <username> with the name of the user
    eg
    c:\users\healdem\documents
    you may be able to access the symbolic directory my documents. but to do that open a file system object break out into debug mode and see what files.directories are available at each iteration / level . ie go up or down the tree to search for what you are looking for
    I'd rather be riding on the Tiger 800 or the Norton

Posting Permissions

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