RE: "Unable to get the pivotfields property of the pivottable class"
Either the property really does not exist (double check the data that is being returned) or you are maybe having the bug in older versions of excel where the vb macro access to the pivot object would disconnect, therefore no objects are viewable from the code. This was patched up in later versions of office2000 and xp.
If it is a data issue, you can debug your macro to determine the exact property it is looking for, then look to ensure your data has the required field(s) and values.
What bug would this be. I am having a strange situation where I can get up to a point in customising a pivot table through VBA, and then when attempting to read the name property of a pivotitem I get the error:
"Unable to get the pivotfields property of the pivottable class"
Strangely even if I break before this line of code runs, and using the watch window look at the properties of the pivot item, the pivot table becomes unreadable, even though before I browsed the pivotitem properties in the watch window it was fine.
This was a bug (from 2003) that was in Excel 2000, but we worked w/ MS and they create a hotfix and it was included in subsequent office updates.
Any fully patched office 2000 or greater version will include a fix for this bug.