Good day,
I am experiencing problems when trying to stop and end PowerPlay as an Object in my Lotus Script. I have posted a piece of script below with which I experience some problems from time to time. Sometimes the PowerPlay process ends perfectly when I run the macro and other times it simply doesn't stop at all. The problem is that there is no pattern in the way that the problem occurs and that makes it difficult to pinpoint where the problem is. Could anyone please have a look at the code or make some suggestions.Thanks
Sub Main()
Dim objPPRep As Object
Dim objPPRes As Object
'******** Making a backup copy of already existing Excel file***************
FileCopy "\\MyPath\MyFile.xls","C:\MyPath\MyFile.xls"
FileCopy "\\MyPath1\MyFile1.xls","C:\MyPath1\MyFile1.xls"
'*********** Taking the .mdc from MyServer and bringing it to MyServer1 **********
FileCopy "\\MyPath\MyFile.mdc","C:\MyPath\MyFile.mdc"
FileCopy "\\MyPath1\MyFile1.mdc","C:\MyPath1\MyFile1.mdc"
'**************** Creating MyFile.xls **************
Set objPPRep = GetObject("C:\MyPath\MyFile.mdc", "CognosPowerPlay.Report")
objPPRep.SaveAs "\\MyPath\MyFile",4,True
objPPRep.Close
Set objPPRep = Nothing
'*********************** Creating MyFile1.xls **************
Set objPPRep = GetObject("C:\MyPath1\MyFile1.mdc", "CognosPowerPlay.Report")
objPPRep.SaveAs "\\MyPath1\MyFile1",4,True
objPPRep.Close
Set objPPRep = Nothing
End Sub
"We know nothing but, that what we know is not the truth..." - Me
I am experiencing problems when trying to stop and end PowerPlay as an Object in my Lotus Script. I have posted a piece of script below with which I experience some problems from time to time. Sometimes the PowerPlay process ends perfectly when I run the macro and other times it simply doesn't stop at all. The problem is that there is no pattern in the way that the problem occurs and that makes it difficult to pinpoint where the problem is. Could anyone please have a look at the code or make some suggestions.Thanks
Sub Main()
Dim objPPRep As Object
Dim objPPRes As Object
'******** Making a backup copy of already existing Excel file***************
FileCopy "\\MyPath\MyFile.xls","C:\MyPath\MyFile.xls"
FileCopy "\\MyPath1\MyFile1.xls","C:\MyPath1\MyFile1.xls"
'*********** Taking the .mdc from MyServer and bringing it to MyServer1 **********
FileCopy "\\MyPath\MyFile.mdc","C:\MyPath\MyFile.mdc"
FileCopy "\\MyPath1\MyFile1.mdc","C:\MyPath1\MyFile1.mdc"
'**************** Creating MyFile.xls **************
Set objPPRep = GetObject("C:\MyPath\MyFile.mdc", "CognosPowerPlay.Report")
objPPRep.SaveAs "\\MyPath\MyFile",4,True
objPPRep.Close
Set objPPRep = Nothing
'*********************** Creating MyFile1.xls **************
Set objPPRep = GetObject("C:\MyPath1\MyFile1.mdc", "CognosPowerPlay.Report")
objPPRep.SaveAs "\\MyPath1\MyFile1",4,True
objPPRep.Close
Set objPPRep = Nothing
End Sub
"We know nothing but, that what we know is not the truth..." - Me