Logo 
Search:

Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Programmatically Access Document Profiles

  Asked By: Jena    Date: Sep 07    Category: Sharepoint    Views: 748

I am trying to write an application in Visual Basic v.6.0 that accesses
documents on a SPS server. Does anyone know how I can retrieve a list of the
Document Profiles that already exist on the server using ADO?

Any recommended readings on how to use ADO to access SPS? I have already
tried going through the SDK help but there are limited references (and
examples) on using ADO to access data.

Share: 

 

2 Answers Found

 
Answer #1    Answered By: Bradford Norman     Answered On: Sep 07

The document  profiles can be retrieved using the
PKMCDO object.
You will need to bind to the workspace or folder and
then retrieve  the content classes(profiles)
you will get some extra profiles  besides the ones
which you can see in the documentprofiles folder.

 
Answer #2    Answered By: Chandrabhan Baroova     Answered On: Sep 07

I am trying to access  the list  of all document  profiles that have been
created in a workspace using the following code in VB:

---------------------------------------------------------------------------
Dim oWS As New PKMCDO.KnowledgeWorkspace
Dim oFolder As New PKMCDO.KnowledgeFolder
Dim oDocument As New PKMCDO.KnowledgeDocument
oWS.DataSource.Open "http://sharepoint/workspace/"
oFolder.DataSource.Open "http://sharepoint/workspace/management/document
profiles/"


Dim oF As PKMCDO.KnowledgeFolder
Dim oRS As ADODB.Recordset
Set oF = oFolder
Set oRS = oF.Subfolders
While Not oRS.EOF
Debug.Print oRS.Fields("DAV:href")
Debug.Print oRS.Fields("DAV:contentclass")
oRS.MoveNext
Wend
Set oRS = oF.Items
While Not oRS.EOF
Debug.Print oRS.Fields("DAV:href")
Debug.Print oRS.Fields("DAV:contentclass")
oRS.MoveNext
Wend
---------------------------------------------------------------------------

I only get references  for the wizard to create new profiles  and not the
existing profiles (see below for results).


http://sharepoint/workspace/Management/Document Profiles/Add Document
Profile.acc
urn:content-classes:wizard/addcontentclass

Any ideas on what I am doing wrong?

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