I've searched the community forums and I'm unable to get clarity on this issue.
I need a macro that will create a folder when the user presses a button. I have been able to get this to work in Qlikview Desktop but I need it to work from Ajax accesspoint.
Here is the macro that I'm using:
sub createFolder set Var = ActiveDocument.GetVariable("vUserReportFolder") newfolderpath = Var.GetContent.String set filesys = CreateObject("Scripting.FileSystemObject") If Not filesys.FolderExists(newfolderpath) Then Set newfolder = filesys.CreateFolder(newfolderpath) rem msgbox("A new folder has been created: " & newfolderpath) End If end sub
In the QMC, I have enabled macro execution and unsafe macro execution in security settings.
With normal macros it won't be possible. It might be possible with server-side macros. I never used them - just know that there is such a feature. If this kind of action is really supported it would require that the machine on which the server runs and the server-user have the appropriate access rights to the wanted target. I rather doubt that this is case respectively that your company want to allow it ...
I must admit that I have some doubts that you could directly create the folder with the AJAX client even with server-side macros.
It's not quite clear for me what would be the real benefit that users could create a folder through QlikView instead of doing it directly within the explorer. Such a tasks might be also simplified with some links/batches on the user-side.
Nevertheless you might consider some workaround like storing the object within a default-folder on the server and including the path-information within the file-name and each n minutes a windows-tasks checked this folder and move this file to the wanted destination by creating the folder if needed and removing the path-information from the file-name again.