Hi BerndB,
Still I am not able to bypass the User Authentication Window (pic attach). the code you suggested doesn’t work while documentin Universe in BO XI R2.
ObjDes.Interactive = False ’ we are in batch
ObjDes.Visible = False ’ we are in batch
Could you help me out regarding this futher…
My code is as given below…
I have just changed the Call DesApp.LogonDialog to Call DesApp.Logon(“suraj”, “suraj”, “M2A-10-D-199.cms”, “secEnterprise”) with my
user name=suraj
password=suraj
Servername=M2A-10-D-199.cms and
Authentication mode=secEnterprise
to by pass the user authentication windows while login into the Universe. I have also set the DessApp.Interactive = False in the code.
Sub DocumentUniverse()
Dim DesApp As Designer.Application
Dim Univ As Designer.Universe
Dim CurrentApp As String
On Error GoTo ErrorHandler
'some Excel housekeeping
CurrentApp = Application.Caption
Application.Cursor = xlWait
Application.DisplayAlerts = False
'start Designer and log in
Set DesApp = New Designer.Application
[b]DessApp.Interactive = False[/b]
DesApp.Window.State = dsMinimized
DesApp.Visible = False
Application.StatusBar = "Logging in..."
'Call DesApp.LogonDialog
[b]Call DesApp.Logon("suraj", "suraj", "M2A-10-D-199.cms", "secEnterprise") [/b]
'open a universe
Application.StatusBar = "Opening universe..."
Set Univ = DesApp.Universes.Open
'DesApp.Visible = False
'restore Excel as active application
Call AppActivate(CurrentApp)
Application.ScreenUpdating = True
'call separate procedure for each part of the universe
Call ListTables(Univ.Tables)
Call ListColumns(Univ.Tables)
Call ListJoins(Univ.Joins)
Call ListContexts(Univ.Contexts)
Call ListClasses(Univ.Classes, 1)
Call ListObjects(Univ.Classes, 1)
Call ListConditions(Univ.Classes, 1)
CleanUp:
On Error Resume Next
Application.StatusBar = False
Application.Cursor = xlDefault
Univ.Close
Set Univ = Nothing
DesApp.Quit
Set DesApp = Nothing
Exit Sub
ErrorHandler:
Call AppActivate(CurrentApp)
MsgBox Err.Source & " - " & Err.Number & ": " & Err.Description, _
vbCritical, “Failure in DocumentUniverse()”
Resume CleanUp
End Sub
Still I am getting the same error. Could you suggest why this is happenning and how to bypass thw User Authentication Mode …
Thanks and regards,
Suraj,
suraj_228 (BOB member since 2007-03-08)