Using PivotPrint.htc with Spreadsheet

  • Thread starter Phillip Peterson
  • Start date
P

Phillip Peterson

I'm trying to apply the Printing Sample for the PivotTable to the
Spreadsheet.

I've copied these files to my directory:
BrowserSafe.bas
Helper.cls
otphelp.cab
PivotPrint.htc

I have the set the CLASS= for my spreadsheet object to "Printing" and
added...
.Printing
{
behavior: url(PivotPrint.htc);
}
....to my stylesheet.

In the OnLoad event for my page, I've added...
Form1.Spreadsheet1.PrintCodeBase = "otphelp.cab"

And in the PivotPrint.htc, I put an alert('here'); in the init() function.

Now, here's what happens. As the page loads, I get the 'here' alert.
However, when I click my print button, I get the error...

Object required: 'Form1.Spreadsheet1.Printing'.

....which tells me that PivotPrint.htc didn't actually attach to my
Spreadsheet1 object. Did I leave a step out? Why wouldn't it connect?
 
A

Alvin Bruney

You need to fully qualify the form as in document.all.form1. See if that
helps.
 
P

Phillip Peterson

That's if you're using JavaScript. I'm using VBScript. I've got other
blocks of code that reference the spreadsheet object with just
Form1.Spreadsheet1... and they work fine.

Has anyone else gotten the PivotPrint print example to work with the
spreadsheet?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top