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.