p_mariet
11 years agoOccasional Contributor
Testcomplete opening Outlook instead of Excel VBScript
Hi,
I'm having a problem with TC and the microsoft suite.
I'm trying to modify a cell in a table in a given tab of my Excel sheet, but when I call the worksheet, instead of opening Excel, Outlook pops up.
here is my sample code:
sPath = "\\SERVER\... .xlsx"
...
Set Excel = Sys.OleObject("Excel.Application")
Set varExcelOpenFile = Excel.Workbooks.Open(sPath)
Set varDataSheet = Excel.ActiveWorkBook.WorkSheets(strBuild)
Set varDataSheet.Cells(x,y) = varPartId
Log.Message(dataSheet.Cells(x, y))
When I put breakpoints and run it step by step, every thing seems fine until the Set on varExcelOpenFile.
When I browse through the Locals, ContentTypeProperties: "Error: This document must contain properties content type. These properties are required for file management system documents."
And then the next step opens Outlook.
My Office version is 2010 and my TC version is 9.31.
I think it's due to my Office version but I don't really know what to do.
Has anyone got a solution of a tip?
Thanks
I'm having a problem with TC and the microsoft suite.
I'm trying to modify a cell in a table in a given tab of my Excel sheet, but when I call the worksheet, instead of opening Excel, Outlook pops up.
here is my sample code:
sPath = "\\SERVER\... .xlsx"
...
Set Excel = Sys.OleObject("Excel.Application")
Set varExcelOpenFile = Excel.Workbooks.Open(sPath)
Set varDataSheet = Excel.ActiveWorkBook.WorkSheets(strBuild)
Set varDataSheet.Cells(x,y) = varPartId
Log.Message(dataSheet.Cells(x, y))
When I put breakpoints and run it step by step, every thing seems fine until the Set on varExcelOpenFile.
When I browse through the Locals, ContentTypeProperties: "Error: This document must contain properties content type. These properties are required for file management system documents."
And then the next step opens Outlook.
My Office version is 2010 and my TC version is 9.31.
I think it's due to my Office version but I don't really know what to do.
Has anyone got a solution of a tip?
Thanks