![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: Feb 2002
Posts: 232
|
Hi Again
I need to create the code that will export a Business Objects report to a .pdf or .xls then email it to the client. The code is done in BO script called "Report sript" but is similar to VBA. I know this is a bit out of scope of the site, but if anyone has experience doing this it would be greatly appreciated. Matt |
|
|
|
|
|
#2 |
|
Board Regular
Join Date: Feb 2002
Posts: 232
|
Sorry to bring this one back... any idea?
|
|
|
|
|
|
#3 |
|
Board Regular
Join Date: Dec 2003
Location: Lincoln
Posts: 237
|
sorry to bump such an old post but i too would like to do this.....
Any ideas? ta |
|
|
|
|
|
#4 |
|
Board Regular
Join Date: Mar 2002
Location: Cincinnati, Ohio, USA
Posts: 6,824
|
You are going to have to educate us a bit in order to recieve some help. Is this "Report sript" something that is available to VBA via COM? Does it need to be translated into VBA?
|
|
|
|
|
|
#5 |
|
Board Regular
Join Date: Dec 2003
Location: Lincoln
Posts: 237
|
Ok sorry, this is the code: - problem occurs in the penultimate line (I have discoverd that i am running BO 5.1.8 which cannot export to excel!, but should export to a text file which i can then open in excel)
any ideas why this will not work? - error is Runtine error 424 object required thanks Dim BOApp As busobj.Application Dim Doc As busobj.Document Dim DataProv As busobj.DataProvider Set BOApp = New busobj.Application BOApp.Visible = False Call BOApp.LoginAs Set Doc = BOApp.Documents.Open(strPath & "\NSIRauditdataset.rep") Doc.Refresh Document.Reports(1).ExportAsText (strPath & "\NSIRauditdataset.txt") Doc.Save |
|
|
|
|
|
#6 |
|
Board Regular
Join Date: Apr 2004
Location: Yaren
Posts: 58,386
|
Shouldn't you have a reference to BOApp somewhere there?
Perhaps something like this? Code:
BOApp.Reports(1).ExportAsText (strPath & "\NSIRauditdataset.txt") Code:
Doc.Reports(1).ExportAsText (strPath & "\NSIRauditdataset.txt")
__________________
If posting code please use code tags. |
|
|
|
|
|
#7 |
|
Board Regular
Join Date: Dec 2003
Location: Lincoln
Posts: 237
|
Thnak Norrie, the second line was just what i needed! ta
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|