Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a macro that moves particular files after reload, when I manually define the destination path it works fine but when I define the destination path based on the value of a variable it doesn't move the loaded files to the destination path..
Here's the code:
Function FuncMove(file)
SET dest = ActiveDocument.Variables("vDestination")
destination = dest.GetContent.String -> macro doesn't work if i use this
'dest = "D:\TAENA KA NOEL\Multi Sheet\LoadedWorkbooks\" -> when I use this the function works fine
SET filesys = CreateObject("Scripting.FileSystemObject")
If filesys.FileExists(file) Then
SET fsoFile = filesys.GetFile(file)
fsoFile.Move destination
End If
End Function
Use something like
activedocument.variable("dest").setcontent vDestination.getcontent.string
instead of doing like
SET dest = ActiveDocument.Variables("vDestination")
destination = dest.GetContent.String