I want to use the “Save for all users” option in a script I wrote. The script loads, refreshes and saves the document. These documents cannot be read by other users who are using the stand-alone BO reporter (without repository). They get the famous “You are not authorized to use this document” message.
Is there a way to save those documents from the script with the “Save for all users” option?
Definition Sub SaveAs([FileName As String], [ForAllUsers])
Syntax var.SaveAs([fileName], [all])
var is the name of the Document variable that you declare.
fileName is a string that contains the filename of the document without its
extension, or the filename with its path and extension.
all is a Boolean which determines whether or not the document is saved for all
users.
BUT I DO NOT MANAGE TO GET IT TO WORK. It does not compile when I try : CurDoc.SaveAs(Location,1)