AndrewMozley
Programmer
have been developing applications in VFP6 & VFP8 to interface with Microsoft Excel and have found Tamar Granar's book "Microsoft Office Automation" a good starting point.
However I am finding it difficult to find the properties of the various objects which I create after code such as
oExcel = CreateObject("Excel.Application")
oWorkbook = oExcel.Workbooks.Add()
oSheet = oWorkbook.WorkSheets(1)
If I use the VFP debugger I can watch oExcel and oWorkbook and these can be expanded with the plus icon to show lots of of properties. But oSheet shows very few and osheet.pagesetup does not show any.
I can get some help by invoking Intellisense when I key in (e.g.) "osheet." in the watch window but the list box often seems to be populated with names which I doubt apply to the object, e.g. if I key in "oSheet.printout."
The specific thing I want to do is to set the printer name (which I shall have established elsewhere) for a command to Printout a sheet. But in more general terms, is there a way of finding out what the names of the properties that I can use in Excel Automation?
Thanks. Andrew M.
However I am finding it difficult to find the properties of the various objects which I create after code such as
oExcel = CreateObject("Excel.Application")
oWorkbook = oExcel.Workbooks.Add()
oSheet = oWorkbook.WorkSheets(1)
If I use the VFP debugger I can watch oExcel and oWorkbook and these can be expanded with the plus icon to show lots of of properties. But oSheet shows very few and osheet.pagesetup does not show any.
I can get some help by invoking Intellisense when I key in (e.g.) "osheet." in the watch window but the list box often seems to be populated with names which I doubt apply to the object, e.g. if I key in "oSheet.printout."
The specific thing I want to do is to set the printer name (which I shall have established elsewhere) for a command to Printout a sheet. But in more general terms, is there a way of finding out what the names of the properties that I can use in Excel Automation?
Thanks. Andrew M.