Results 1 to 7 of 7

Thread: [RESOLVED] get "my documents" path

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jan 2007
    Posts
    128

    Resolved [RESOLVED] get "my documents" path

    is there a way to get the "my documents" path....

    (e.g. c:\my documents and settings\[username]\)

    but sometimes the "my documents" is like

    c:\my documents and settings\all users\ or
    c:\my documents and settings\administrator\

  2. #2
    Discovering Life Siddharth Rout's Avatar
    Join Date
    Feb 2005
    Location
    Mumbai, India
    Posts
    12,001

    Re: get "my documents" path

    Hi

    download the code at

    http://www.thescarms.com/vbasic/specialfolders.asp

    Hope this helps...
    A good exercise for the Heart is to bend down and help another up...
    Please Mark your Thread "Resolved", if the query is solved


    MyGear:
    ★ CPU ★ Ryzen 5 5800X
    ★ GPU ★ NVIDIA GeForce RTX 3080 TI Founder Edition
    ★ RAM ★ G. Skill Trident Z RGB 32GB 3600MHz
    ★ MB ★ ASUS TUF GAMING X570 (WI-FI) ATX Gaming
    ★ Storage ★ SSD SB-ROCKET-1TB + SEAGATE 2TB Barracuda IHD
    ★ Cooling ★ NOCTUA NH-D15 CHROMAX BLACK 140mm + 10 of Noctua NF-F12 PWM
    ★ PSU ★ ANTEC HCG-1000-EXTREME 1000 Watt 80 Plus Gold Fully Modular PSU
    ★ Case ★ LIAN LI PC-O11 DYNAMIC XL ROG (BLACK) (G99.O11DXL-X)
    ★ Monitor ★ LG Ultragear 27" 240Hz Gaming Monitor
    ★ Keyboard ★ TVS Electronics Gold Keyboard
    ★ Mouse ★ Logitech G502 Hero

  3. #3
    PowerPoster gavio's Avatar
    Join Date
    Feb 2006
    Location
    GMT+1
    Posts
    4,462

    Re: get "my documents" path

    Here's a simpler way:
    VB Code:
    1. Debug.Print Environ("HOMEDRIVE") & Environ("HOMEPATH")
    But it's not 100% reliable tough

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Jan 2007
    Posts
    128

    Re: get "my documents" path

    Quote Originally Posted by gavio
    Here's a simpler way:
    VB Code:
    1. Debug.Print Environ("HOMEDRIVE") & Environ("HOMEPATH")
    But it's not 100% reliable tough
    thx what's the most reliable way then??

  5. #5

  6. #6
    PowerPoster gavio's Avatar
    Join Date
    Feb 2006
    Location
    GMT+1
    Posts
    4,462

    Re: get "my documents" path

    The one RB posted... well, Environ() is reliable, but can be changed by the user - so...

  7. #7

    Thread Starter
    Addicted Member
    Join Date
    Jan 2007
    Posts
    128

    Re: get "my documents" path

    solved thanks very much!

Posting Permissions

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



Click Here to Expand Forum to Full Width