Following code might be helpful
Dim oDoc As New PKMCDO.KnowledgeDocument
Dim oFolder As New PKMCDO.KnowledgeFolder
Dim oWrkStream As ADODB.Stream
Dim sFileName As String 'Name of file to be uploaded
Dim sFullPath As String 'Full path to file to be uploaded
Dim sAuthor As String
Dim sTitle As String
Dim sDesc As String
Dim sParentFolder As String
Dim sDocFolder As String
Dim oVer As PKMCDO.KnowledgeVersion
sFileName = "FileName.pdf"
sFullPath = "D:\FileName.pdf"
sAuthor = "Shane - Author displayed in SPS"
sTitle = "Title displayed in SPS"
sDesc = "Description displayed in SPS"
sParentFolder = "http://ServerName/WorkspaceName/Documents/"
sDocFolder = "http://ServerName/WorkspaceName/Documents/Sales"
Set oWrkStream = oDoc.OpenStream
oWrkStream.Type = adTypeBinary
oWrkStream.SetEOS
oWrkStream.LoadFromFile sFullPath
oWrkStream.Flush
oDoc.Author = sAuthor
oDoc.Title = sTitle
oDoc.Description = sdescription
'oDoc.Keywords = Array("Keyword")
oFolder.DataSource.Open sParentFolder, , adModeReadWrite
oDoc.DataSource.SaveTo sDocFolder + "/" + sFileName, , ,
CreateOptions:=0
' Publish the document
Set oVer = New PKMCDO.KnowledgeVersion
oVer.Checkin oDoc
oVer.Publish oDoc
Set oDoc = Nothing
Set oVer = Nothing