B
brian_madden
(first post sent by mistake)
Hi,
..Net 1.1, OWC10 (10.0.6619.0), XPPro SP1
I'm trying to add a custom context menu to a PivotTable control on an aspx
page. I can create the menu and fire off commands, but when I try to use the
Export to Excel command, I'm getting a permission denied script error. Can
this be done or am I doing something wrong? I've included the code below -
sub PivotTable1_BeforeContextMenu(x, y, Menu, Cancel)
dim vntMenu(1)
dim owcConsts
set owcConsts = Document.Forms(0).PivotTable1.Constants
vntMenu(0) = Array("Export", "owc" & owcConsts.ocCommandExport)
vntMenu(1) = Array("Help", "owc" & owcConsts.ocCommandHelp)
Menu.Value = vntMenu
end sub
Sub PivotTable1_CommandBeforeExecute(Command, Succeeded)
dim owcConsts
set owcConsts = Document.Forms(0).PivotTable1.Constants
if vartype(Command) = vbString then
select case Command
case "owc" & owcConsts.ocCommandExport
Document.Forms(0).PivotTable1.Commands(owcConsts.ocCommandExport).Execute
case "owc" & owcConsts.ocCommandHelp
Document.Forms(0).PivotTable1.Commands(owcConsts.ocCommandHelp).Execute
end select
end if
end sub
TIA,
Brian
Hi,
..Net 1.1, OWC10 (10.0.6619.0), XPPro SP1
I'm trying to add a custom context menu to a PivotTable control on an aspx
page. I can create the menu and fire off commands, but when I try to use the
Export to Excel command, I'm getting a permission denied script error. Can
this be done or am I doing something wrong? I've included the code below -
sub PivotTable1_BeforeContextMenu(x, y, Menu, Cancel)
dim vntMenu(1)
dim owcConsts
set owcConsts = Document.Forms(0).PivotTable1.Constants
vntMenu(0) = Array("Export", "owc" & owcConsts.ocCommandExport)
vntMenu(1) = Array("Help", "owc" & owcConsts.ocCommandHelp)
Menu.Value = vntMenu
end sub
Sub PivotTable1_CommandBeforeExecute(Command, Succeeded)
dim owcConsts
set owcConsts = Document.Forms(0).PivotTable1.Constants
if vartype(Command) = vbString then
select case Command
case "owc" & owcConsts.ocCommandExport
Document.Forms(0).PivotTable1.Commands(owcConsts.ocCommandExport).Execute
case "owc" & owcConsts.ocCommandHelp
Document.Forms(0).PivotTable1.Commands(owcConsts.ocCommandHelp).Execute
end select
end if
end sub
TIA,
Brian