Logo 
Search:

Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Upload file to SPS 2001

  Asked By: Adam    Date: Jan 13    Category: Sharepoint    Views: 1168

Hi,

I am new to SPS and trying my hands on automating file upload from
my m/c to the SPS 2001 which is on another m/c. I use this function
below to save the files after specifying target and source file
paths but get an error msg - class does not support aggregation when
instance of PKMCDO object is created.

Function CreateDocument( _
sFilestream, _
sHref, _
sCC _
) As PKMCDO.KnowledgeDocument

Dim oDoc As PKMCDO.KnowledgeDocument
Dim oStream As ADODB.Stream
Dim nIndex As Integer
Dim sPropName As String

Set oDoc = New PKMCDO.KnowledgeDocument

Set oStream = oDoc.OpenStream
oStream.Type = adTypeBinary
oStream.SetEOS
oStream.LoadFromFile sFilestream
oStream.Flush

If sCC <> "" Then
oDoc.ContentClass = sCC
End If

oDoc.DataSource.SaveTo sHref, , , adCreateOverwrite

Set CreateDocument = oDoc
End Function


Please help me with any script which can meet the requirement.

Thanks

Share: 

 

No Answers Found. Be the First, To Post Answer.

 
Didn't find what you were looking for? Find more on Upload file to SPS 2001 Or get search suggestion and latest updates.




Tagged: