Sharepoint Forum

 
Home » Forum » Sharepoint       Ask a questionRSS Feeds

Programmatically creating workspace

  Asked By: Teddy Weeks         Date: Oct 12, 2009      Category: Sharepoint      Views: 525
 

Can anyone help me to create worksapce and dash boards
using ASP or VB code?


 

3 Answers Found

 
Answer #1       Answered By: Tanisha Rowe          Answered On: Oct 12, 2009       

Did you get any replies to this? I'd be interested.

 
Answer #2       Answered By: Sierra Lewis          Answered On: Oct 12, 2009       

This the vb code  for creating  a workspace

'==================================================================
' CreateWorkspace
'
' Description: creates a workspace
'
' Arguments: sName - name of the new workspace
'==================================================================

Function CreateWorkspace(sName As String) As String
Dim sNewWorkspaceURL As String
Dim sComputerName As String
Dim sServerUrl As String
Dim sProgramFiles As String
Dim sInstallPath As String
Dim sContentPath As String
Dim sSchemaPath As String

sComputerName =
GetEnvironmentVariable("COMPUTERNAME")

Dim objServer As PKMCDO.KnowledgeServer
Set objServer = New PKMCDO.KnowledgeServer

sServerUrl = "http://" + sComputerName +
"/SharePoint Portal Server/workspaces/"

objServer.DataSource.Open sServerUrl, ,
adModeReadWrite

sNewWorkspaceURL = "http://" + sComputerName + "/"
+ sName

sProgramFiles =
GetEnvironmentVariable("PROGRAMFILES")
sInstallPath = sProgramFiles + "\SharePoint Portal
Server\bin\"
sContentPath = sInstallPath +
"defaultworkspace.cab"
sSchemaPath = sInstallPath + "localschema.xml"

' This call may take a while
objServer.CreateWorkspace sNewWorkspaceURL,
sSchemaPath, sContentPath

CreateWorkspace = sNewWorkspaceURL

End Function

 
Answer #3       Answered By: Dwight Becker          Answered On: Oct 12, 2009       

If you have installed SPS SDK , you can find all the VB and C++ sample code  at
this location <sdk_root>\samples\SPS\OM

 
Didn't find what you were looking for? Find more on Programmatically creating workspace Or get search suggestion and latest updates.


Your Answer
  • Answer should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].