Hi , I am calling bo from an access database with the following code
Private Sub Label15_Click()
Dim BOApp As busobj.Application
Dim Doc As busobj.Document
Dim Rpt As busobj.Report
Set BOApp = New busobj.Application
BOApp.Visible = False
Call BOApp.LoginAs("logon", "password", True)
Set Doc = BOApp.Documents.Open("S:Jim Todd\Intransit\Outstanding TN's.rep")
'Doc.Variables("date").Value = Format(Date - 92, "dd/mm/yyyy")
BOApp.Interactive = False
Doc.Refresh
'BOApp.Interactive = True
For Each Rpt In Doc.Reports
Call Rpt.ExportAsText(Doc.Path & "\" & Rpt.name)
Next Rpt
BOApp.Quit
Set BOApp = Nothing
On Error GoTo 0
DoCmd.RunMacro "Macro1"
Exit Sub
err:
MsgBox "917 update failed"
End Sub
Which works fine but even when I enter valid username and password I still get the bo logon screen (with the data filled in )but I still have to click ok,
I need to automate this procedure so need BO to open without any intervension (do not have to click ok) so bo opens runs the report saves it and closes automatically .
Private Sub Label15_Click()
Dim BOApp As busobj.Application
Dim Doc As busobj.Document
Dim Rpt As busobj.Report
Set BOApp = New busobj.Application
BOApp.Visible = False
Call BOApp.LoginAs("logon", "password", True)
Set Doc = BOApp.Documents.Open("S:Jim Todd\Intransit\Outstanding TN's.rep")
'Doc.Variables("date").Value = Format(Date - 92, "dd/mm/yyyy")
BOApp.Interactive = False
Doc.Refresh
'BOApp.Interactive = True
For Each Rpt In Doc.Reports
Call Rpt.ExportAsText(Doc.Path & "\" & Rpt.name)
Next Rpt
BOApp.Quit
Set BOApp = Nothing
On Error GoTo 0
DoCmd.RunMacro "Macro1"
Exit Sub
err:
MsgBox "917 update failed"
End Sub
Which works fine but even when I enter valid username and password I still get the bo logon screen (with the data filled in )but I still have to click ok,
I need to automate this procedure so need BO to open without any intervension (do not have to click ok) so bo opens runs the report saves it and closes automatically .