Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I used this macro to create folder and i give the system access , But the folder didnt create and i have not any error
SUB folder()
set Var = ActiveDocument.GetVariable("D:\TEST")
dim filesys, newfolder, newfolderpath
newfolderpath = Var.GetContent.String
set filesys=CreateObject("Scripting.FileSystemObject")
If Not filesys.FolderExists(newfolderpath) Then
Set newfolder = filesys.CreateFolder(newfolderpath)
msgbox("A new folder has been created at: " & newfolderpath)
End If
END SUB
Are you sure that you have variable with the name of "D:\TEST" and that they contained a valid path? I assume that this is rather your aimed target-path and not a variable. Therefore go into the gui and create there a variable maybe "FolderPath" and assign "D:\TEST" as value and it should work with:
...
set Var = ActiveDocument.GetVariable("FolderPath")
...
- Marcus
Are you sure that you have variable with the name of "D:\TEST" and that they contained a valid path? I assume that this is rather your aimed target-path and not a variable. Therefore go into the gui and create there a variable maybe "FolderPath" and assign "D:\TEST" as value and it should work with:
...
set Var = ActiveDocument.GetVariable("FolderPath")
...
- Marcus