OWC10.Spreadsheet.Range().Cut error: 70-Permission denied

E

ed.lennox

Hi,
I am using OWC10.Spreadsheet web-server-side to serve up Excel sheet
data as HTML.

I am however getting a script error 70-Permission denied when the
following code is executed:
---> oSheet.Range("D3:G51").Cut (oSheet.Range("C3"))
oSheet.Range("B125:C172").Cut (oSheet.Range("G3"))
oSheet.Range("D125:G172").Cut (oSheet.Range("G3"))

This was code that ran OK with OWC9 but since switching to 10, the above
code fails.
I know there is a security patch for Office and I guess OWC as well,
that blocks access to the clipboard, but the .Cut method in the case
above is not actually copying data to the clipboard (as I have a target
cell). Or is it?

I have tried unlocking the range:
oSheet.ActiveSheet.UsedRange.Locked=false
and disabling protection:
oSheet.ActiveSheet.Protection.Enabled = false
before running the above code, but no luck.

What I am trying to do is to move a range of cells from one area of the
sheet to another.

If in fact I can no longer use the .Cut method as above, any ideas on
how I can quickly move a block of cells from one area in the sheet to
another?

TIA
Ed
 
A

Andy Tischaefer [MS]

The setting you are looking for is under IE Security
Settings for whatever zone you want it to work in (Local
Machine is a different zone on different versions of
Windows I think)

Choose the zone, then choose "Custom" then scroll down to
the "Scripting" section. Set "Allow Paste Operations Via
Script" to "Enable".

- Andy Tischaefer
 

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