Hi guys,
I worte a macro to refresh a report by passing values and save them as pdf files and now the user wants data in excel sheet to work on.
This is my macro for saving pdf.
Set doc = Application.Documents.Open("C:\R-20-##-###-CY2002.rep"
Set var = doc.Variables.Item(1)
Set var1 =doc.Variables.Item(2)
var.Value = dotcntycd
var1.Value = wislrcmtycd
Application.Interactive = False 'Turns off all warnings.
doc.Refresh
Application.Interactive = True 'Turns on all warning.
strfile1 = ""
strfile1 = "C:\R-20-" & dotcntycd & "-" & wislrcmtycd & "-CY2002.pdf"
strfile1 = CStr(strfile1)
doc.SaveAs strfile1
doc.Close
Now I need to add some code after refresh and before i close the document. So that i export data from the cube!! Please let me know.
Thanks
Mat
I worte a macro to refresh a report by passing values and save them as pdf files and now the user wants data in excel sheet to work on.
This is my macro for saving pdf.
Set doc = Application.Documents.Open("C:\R-20-##-###-CY2002.rep"

Set var = doc.Variables.Item(1)
Set var1 =doc.Variables.Item(2)
var.Value = dotcntycd
var1.Value = wislrcmtycd
Application.Interactive = False 'Turns off all warnings.
doc.Refresh
Application.Interactive = True 'Turns on all warning.
strfile1 = ""
strfile1 = "C:\R-20-" & dotcntycd & "-" & wislrcmtycd & "-CY2002.pdf"
strfile1 = CStr(strfile1)
doc.SaveAs strfile1
doc.Close
Now I need to add some code after refresh and before i close the document. So that i export data from the cube!! Please let me know.
Thanks
Mat