BusinessObjects Board

VBA Code for Save for All users

Hi,

I have bunch of reports, which are not opening with any user profile except General Supervisor.
When I try to open those reports it is giving FRM0008 error, not authorized to open.
Now, am looking for a VBA code where I can open and save these reports for All users.
If any one has the code please let me know.

Thanks for your help in advance.


Shyam Sunder (BOB member since 2006-03-27)

Hi ! and welc :mrgreen: m to B :mrgreen: B !!

Try this

Sub SaveForAllUsers()
    Dim PathName As String
    Dim RptName As String
    Dim Doc As Document
    PathName = InputBox("Répertoire : ", "Save For All Users", "c:\tmp\")
    RptName = Dir(PathName & "*.rep")
    Do While RptName <> ""
        RptName = PathName &amp; RptName
        If RptName <> ThisDocument.FullName Then
            Set Doc = Application.Documents.Open(RptName, True, False)
            Call Doc.SaveAs(RptName, True)
            Call Doc.Close
        End If
        RptName = Dir
    Loop
End Sub

bernard timbal :fr: (BOB member since 2003-05-26)

Hello Bernard,

Thanks for quick reply.
Unfortunately the given one is not working,
it is not giving any error also, after hit on RUN nothing is happening.
Please let me know if am missing anything.

Thanks.


Shyam Sunder (BOB member since 2006-03-27)

That code looked familiar smile. Have a look at this post. It includes an actual utility. Bernard added the capability to type in a path for the files. I’m wondering if the path you typed in may be invalid or missing the trailing backslash. It would find no files named *.rep and would end very quickly. My version assumes all the files are in the same path as the utility, but I know it works. I’ve used it many times recently as a step to manually test a 5.1.7 to XIr2 migration.


Dwayne Hoffpauir :us: (BOB member since 2002-09-19)

don’t forget the final “” at the end of the directory you enter

NOT c:\Aat BUT c:\Aat\


bernard timbal :fr: (BOB member since 2003-05-26)

Thank You Very Much !!!
It’s working, as u guessed, I was missing backslash…
Thanks once again for your help


Shyam Sunder (BOB member since 2006-03-27)