Advertisement
Advertisement
| 09.16.2008 at 11:47AM PDT, ID: 23736214 | Points: 500 |
|
[x]
Attachment Details
|
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: |
Sub ImportPowerPlay() Dim PowerPlayReport, PowerPlay As Object Dim ReportName, WorkBookName, OpenDir, SaveDir As String Dim ReportPath, WorkBookPath As String OpenDir = "D:\" SaveDir = "D:\" ReportName = "PPlay1.ppr" WorkBookName = "PPlay1.xls" ReportPath = OpenDir & ReportName WorkBookPath = SaveDir & WorkBookName Set PowerPlayReport = GetObject(ReportPath) Set PowerPlay = PowerPlayReport.Application 'Remove the following line, if desired '-------------------------------------- PowerPlayReport.Visible = True PowerPlayReport.SaveAs WorkBookPath, 4, True PowerPlayReport.Close PowerPlay.Quit Set PowerPlayReport = Nothing Set PowerPlay = Nothing Workbooks.Open WorkBookPath End Sub |