VSTO-Detecting Read Only status of workbook opened from Sharepoint

G

Gary Varga

I am maintaining an VSTO3 Excel Add-in.
The Excel workbooks are loaded from SharePoint.
When you click on a workbook on the SharePoint site you get the option for
"Read Only" or "Edit".
When "Read Only" is selected you:
a) get the "[Read-Only]" in the Excel caption for the workbook
b) get a Save As dialog box when clicking the Save button
c) the workbook ReadOnly property (in VSTO) is false

In the Add-in, how can I check whether the workbook is supposed to be read
only?
--
Many thanks,
Gary Varga

Re-posted as I had no valid responses (sorry PeterT - yours didn't count)
and had logged in via an inactive MSDN account.
 
A

Alan Moseley

"In the Add-in, how can I check whether the workbook is supposed to be read
only?"

Do you mean that you want to try and determine when someone has attempted to
open the workbook in Edit mode, but has ended up in Read-Only mode? I don't
think that this is possible to do. You might like to read up on the
ReadOnlyRecommended property of the Workbook object, but I don't think that
it quite fits your situation.
 
G

Gary Varga

No. Someone has opened it in read only mode and I would, programatically,
like to know this i.e. have they opened it read only???

Alan Moseley said:
"In the Add-in, how can I check whether the workbook is supposed to be read
only?"

Do you mean that you want to try and determine when someone has attempted to
open the workbook in Edit mode, but has ended up in Read-Only mode? I don't
think that this is possible to do. You might like to read up on the
ReadOnlyRecommended property of the Workbook object, but I don't think that
it quite fits your situation.

--
Alan Moseley IT Consultancy
http://www.amitc.co.uk

If I have solved your problem, please click Yes below. Thanks.


Gary Varga said:
I am maintaining an VSTO3 Excel Add-in.
The Excel workbooks are loaded from SharePoint.
When you click on a workbook on the SharePoint site you get the option for
"Read Only" or "Edit".
When "Read Only" is selected you:
a) get the "[Read-Only]" in the Excel caption for the workbook
b) get a Save As dialog box when clicking the Save button
c) the workbook ReadOnly property (in VSTO) is false

In the Add-in, how can I check whether the workbook is supposed to be read
only?
--
Many thanks,
Gary Varga

Re-posted as I had no valid responses (sorry PeterT - yours didn't count)
and had logged in via an inactive MSDN account.
 

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