April 2006
Beginner
1114 pages
98h 16m
English
workbook.SharedWorkspace
For workbooks that are part of a shared workspace, returns the SharedWorkspace object used to connect to and maintain the workbook through the SharePoint server. The SharedWorkspace object exists even if the workbook is not shared via SharePoint Services. You can tell whether or not a workbook is part of a shared workspace by checking the object’s Connected property. For example, the following code checks if a workbook is part of a shared workspace before adding another workbook to the shared workspace:
Dim sw As Office.SharedWorkspace
Set sw = ThisWorkbook.SharedWorkspace
If sw.Connected Then
sw.Files.Add ThisWorkbook.Path & "\" & "new.xls"
End IfRead now
Unlock full access