Upload Doc Programatically vs Manually

Upload Doc Programatically vs Manually

Post by Ted » Fri, 28 Mar 2003 06:38:48



If you upload a document to a Document Library the Doc is
registered & listed with New icon.  If you upload a
Document programatically why isn't it viewable or
registered?  What is restricting access? etc...
Any clue would be appreciated...
TIA,
Ted
 
 
 

Upload Doc Programatically vs Manually

Post by Vikra » Fri, 28 Mar 2003 17:42:15


Is the uploaded doc published ?

regards,
vikram



Quote:> If you upload a document to a Document Library the Doc is
> registered & listed with New icon.  If you upload a
> Document programatically why isn't it viewable or
> registered?  What is restricting access? etc...
> Any clue would be appreciated...
> TIA,
> Ted


 
 
 

Upload Doc Programatically vs Manually

Post by Ted » Wed, 02 Apr 2003 00:56:48


Vikram,
No its Saved to a Document Library.  When you say
Published do you mean like publishing a web page?
Ted

>-----Original Message-----
>Is the uploaded doc published ?

>regards,
>vikram




>> If you upload a document to a Document Library the Doc
is
>> registered & listed with New icon.  If you upload a
>> Document programatically why isn't it viewable or
>> registered?  What is restricting access? etc...
>> Any clue would be appreciated...
>> TIA,
>> Ted

>.

 
 
 

1. trying to upload document programatically

I tried to upload a document in a workspace document
folder using
CreateDocument function from the SPS SDK sample "adapted"
to VBscript.

When I launch the function I get the following error (on
the line which
contains "oStream.LoadFromFile sFilestream"):

Error Type:
ADODB.Stream (0x800A0BBA)
File could not be opened.

Does anybody know which is the problem?
The code is the following:

'----------------------------------------------------

'/// <summary>Import document on server</summary>
'/// <param name="sFileStream">Path of the file to be
uploaded</param>
'/// <param name="sHref">New document's URL</param>
'/// <param name="sCC">Document's content class </param>
'/// <returns>The created document object</returns>

Function CreateDocument(sFilestream, sHref, sCC)

    Dim oDoc
    Dim oStream
    Dim nIndex
    Dim sPropName

    Set oDoc = CreateObject("CDO.KnowledgeDocument")
    Set oStream = oDoc.OpenStream
    oStream.Type = 1
    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

'-----------------------------------------------------

Thank you,

Nicola

2. Upgrading from FP 3.0 to FP 5.0

3. uploading documents programatically via scripting?

4. password

5. updating doc profile programatically ASP

6. wu-imapd to log all info

7. HELP trying to get whether or not a doc is checked out programatically HELP!

8. ASI on Signal Processing for Multimedia

9. Need help for upload = doc published

10. cannot edit & save uploaded excel doc

11. Error uploading to doc library on home page - transfered from .caml

12. linking to instead of uploading docs

13. Uploading docs from Word