VSTO: Detecting Read Only status of workbook opened from Sharepoin

G

Gary Varga

I am maintaining an Excel 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" 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 is false

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

Peter T

You can look at the ReadOnly property of the workbook

bReadOnly = wb.ReadOnly

Regards,
Peter T
 
G

Gary Varga

I DO.

As stated in my original post:

c) the workbook ReadOnly property is false

Thanks anyway.
 

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