Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

how to define path to folder "MyDocuments" on user's workstation? (or Desktop)

Hello

Does anyone know how to define path to folder "MyDocuments" (or Desktop) on user's workstation?

I use macros to export report in MS Excel. User need to write right path for my app to save export-file, sometimes user made mistake and I get wrong path. So, can I define this path without user?

1 Solution

Accepted Solutions
Clever_Anjos
Employee
Employee

Use this:

Set WshShell = CreateObject("WScript.Shell")

strDocuments = WshShell.SpecialFolders("MyDocuments")

IMPORTANT: you must give System Access in order this work

Capturar.PNG.png

View solution in original post

1 Reply
Clever_Anjos
Employee
Employee

Use this:

Set WshShell = CreateObject("WScript.Shell")

strDocuments = WshShell.SpecialFolders("MyDocuments")

IMPORTANT: you must give System Access in order this work

Capturar.PNG.png