Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I need to obtain the document name in the script.
I am using version 8.20.5415.2 in my computer and version 8.20.5402.2 in the Server.
I have an application that uses the DocumentName() function to obtain the name of the document and it worked fine in my computer.
When I published the application on the server the script didn't recognize the DocumentName() function when loading the application. So I need to find another way to obtain the name.
I read everything I found on the blog.
- The system variable QVWorkPath is not good because it is loaded only at the end of the script. (First load can give a wrong document name)
- Writing a function that returns the document name by using Function GETNAME() GETNAME = ActiveDocument.Name End Function hangs when running from the script. I am not an expert in Macros, I pick these lines from the forum.
- If I use ActiveDocument.GetProperties.FileName I obtain no value.
The last 2 are giving the path name if is use msgbox(ActiveDocument.Name) or msgbox(ActiveDocument.GetProperties.FileName) when testing the macro.
Someone can share any idea on how to obtain this name?
Thank you
I have no idea, you should ask QT support. Maybe this is a bug.
As QV v9.00 has been available for some time, and v8.50 is now very mature (SR5) I wonder what impediments you have to upgrading from v8.20 to at least v8.50sr5 where we know that DocumentName() is available and works.
Regards,
MichaelR