Re: Development Question: How to tell if SPWeb is a Document WorkSpace?

From: Jim Duncan (jim_at_collutions.spam)
Date: 08/27/04


Date: Fri, 27 Aug 2004 11:24:20 -0700

As promised (though late):

Private Function parseSPWeb(ByVal webCollection As
Microsoft.SharePoint.SPWeb) As String
    Dim subSite As SPWeb
    Dim str, meetingSpaceStr, documentSpaceStr, subWebStr As String

    For Each subSite In webCollection.Webs
        Dim subSiteHTML
        subSiteHTML = "     *" _
            & "<a target = 'blank' href ='" _
            & subSite.Url _
            & "'>" _
            & subSite.Title.ToString _
            & "</a>: " _
            & subSite.Description.ToString _
            & "<br>"

        If CInt(subSite.WebTemplateID) = CInt(SPWebTemplate.Meetings) Then
            meetingSpaceStr += subSiteHTML
        ElseIf CShort(subSite.Configuration) =
CShort(SPWebTemplate.TeamSiteConfiguration.DocumentWorkspace) Then
            documentSpaceStr += subSiteHTML
        Else
            subWebSte += subSiteHTML
        End If
    Next

     str += meetingSpaceStr & documentSpaceStr & subWebStr

    Return str

End Function

Visual Basic is not my native (programming) language, so double check the
syntax and casting (I code mostly in C#).

-Jim

"Jim Duncan" <nospam@leavemealone.pls> wrote in message
news:uUW$0VtiEHA.2544@TK2MSFTNGP10.phx.gbl...
> Hi Eric,
>
> The cMySites web part ( http://tinyurl.com/5seds ) will display an image
> showing the type of site (Team Site, Doc Workspace, Meeting Workspace) so
I
> know it's possible. The problem is that I don't remember how I did this
and
> am away from the office (where the source code is). I'll post back with
the
> details when I get back to the office or remember how I did it :-)
>
> Jim Duncan
> Collutions, Inc.
>
>
>
> "Eric" <schmittes06@yahoo.com> wrote in message
> news:u8WDxHsiEHA.2808@TK2MSFTNGP10.phx.gbl...
> > As you can see from the code below I am working on a VB.Net function
that
> > parses a SPWeb collection into three categories: meeting workspaces,
> > document workspaces, and other sub webs. I was able to detect the sites
> > that where made with a meeting template. However, I cannot figure out
how
> to
> > detect if the subSite is a document workspace. I would appreciate it if
> > anyone could lead me in the right direction. -- Eric
> >

> >
> >
>
>



Relevant Pages

  • Re: A simple metaobject protocol for packages
    ... Christophe Rhodes wrote: ... string for google to find anything myself. ... Meeting: some details are at ...
    (comp.lang.lisp)
  • Syntax Error
    ... I have a form where a user can enter the date so that a list of invoices ... meeting that date will be printed. ... Dim strWhere As String ... However I get a Syntax error in string in expression. ...
    (microsoft.public.access.forms)
  • Help Regex Language Processing, simple small task
    ... I am able to do some great big things with regex and have done some ... really complicated extraction procedures, but what I really need now is ... meeting should last no longer than one hour. ... So the first meeting takes over the second meetings text string, ...
    (php.general)
  • Re: day of month
    ... The following code works for when it is the day of the week, but I have a problem when I list tomorrows meeting and today's date is the last day of the week - it will not recognise the 1st day of the next moth as being tomorrows date. ... var day=mydate.getDay ... Ensures n is always returned as a string. ...
    (comp.lang.javascript)