Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9149723
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T11:30:58+00:00 2026-06-17T11:30:58+00:00

I’m already using the following code to copy a file to Livelink: Public Function

  • 0

I’m already using the following code to copy a file to Livelink:

Public Function saveFileLL(target As Long, pathSource As String, fileName As String) As Boolean
    Dim dav As New ADODB.Record
    Dim files As New ADODB.Recordset
    Dim objStream As New ADODB.Stream
    Dim url As String

    If Not Val(Nz(target, 0)) > 0 Or Not pathSource Like "*.*" Or Not fileName Like "*.*" Then
        saveFileLL = False
        Exit Function
    End If

    url = URL_LIVELINK_DAV & target

    dav.Open url, , adModeReadWrite
    Set files = dav.GetChildren

    If Not (files.BOF And files.EOF) Then files.MoveFirst

    Do Until files.EOF
        If fileName Like Replace(files("RESOURCE_DISPLAYNAME"), "_", "?") Then Exit Do
        files.MoveNext
    Loop

    If files.EOF Then
        files.addnew "RESOURCE_PARSENAME", fileName
        files.Update
    End If

    files.Close
    dav.Close

    objStream.Open "URL=" & url & "/" & fileName, adModeWrite
    objStream.Type = adTypeBinary
    objStream.LoadFromFile pathSource
    objStream.Flush
    objStream.Close

    Set dav = Nothing
    Set files = Nothing
    Set objStream = Nothing

    saveFileLL = True
End Function

Now, as the title says, I would like to do the same but with a folder. I guess my question isn’t really related to Livelink but more to the way to handle folders in general. Is it possible to move a folder with all his children without looping through all the subfolders/files? How could I adapt my saveFileLL() function to do so?

EDIT:

Here is another portion of code that allows me to directly create one folder into the Livelink folder designed by objId.

Public Function CreateFolderToLLFolder(ObjId As String, folderName As String, Optional getId As Boolean = False) As String
    Dim davfile As New ADODB.Record
    Dim davFiles As New ADODB.Recordset
    Dim davDir As New ADODB.Record

    Dim newDirFields(1) As Variant
    Dim newDirValues(1) As Variant

    newDirFields(0) = "RESOURCE_PARSENAME"
    newDirValues(0) = folderName
    newDirFields(1) = "RESOURCE_ISCOLLECTION"
    newDirValues(1) = True

    Set davDir = connection(ObjId, "")
    Set davFiles = davDir.GetChildren()
    If (davFiles.Supports(adAddNew)) Then
        davFiles.addnew newDirFields, newDirValues
    End If

    davfile.Open davFiles, , adModeReadWrite
    CreateFolderToLLFolder = davfile.fields("urn:x-opentext-com:ll:properties:nodeid").value
End Function

Public Function connection(ObjId As String, Optional filename As String = "") As ADODB.Record
    Dim davDir As New ADODB.Record
    davDir.Open filename, "URL=http://livelink-server/livelinkdav/nodes/" & ObjId & "/", adModeReadWrite, adFailIfNotExists, DelayFetchStream, "", ""
    Set connection = davDir
End Function

Don’t ask me why this works, I found this and it does work. objId for those wondering is the unique ID that Livelink gives to all his files/folders.

Thank you.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T11:30:58+00:00Added an answer on June 17, 2026 at 11:30 am

    The easiest way to perform what I want is finally to use the web service integrated into Livelink. Because there is really not much information on the Web about the whole Livelink API (that’s surprising considering all we can find on Google these days), I’m willing to post here my solution. That’s in fact really easy.

    All I had to do is to install some add-on to Firefox (I used Fox but others would do the job too) to see the HTTP headers/packets when doing some work in Livelink. Most of the times, operations are done with the POST method. I realized with the Fox plugin that 3 POST are sent, the 2 first returned a 401 error while the 3rd returns the right 200 response and got the action done.

    Then, I can deduce that Livelink is a SOAP-service based on a NTLM authentification. It looks like it has been developped in ASP.net.

    To use the webservice within VBA, nothing more easy. You will need the Microsoft XML v6.0 livrary for the MSXML2 object, and there you go:

    Dim sMsg As String
    Dim sURL As String, postData As String
    Dim ObjHTTP As Object
    
    Set ObjHTTP = New MSXML2.XMLHTTP
    sURL = "http://server.com/livelink/livelink.exe"
    postData = "your-post-data"
    
    ObjHTTP.Open "Post", sURL, False
    ObjHTTP.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
    ObjHTTP.send (postData)
    
    Set ObjHTTP = Nothing
    

    As simple as that, just find the right POST data with some kind of browser’s plugin and you got it. Most of the post-data isn’t encoded and easy to deal with.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
We are using XSLT to translate a RIXML file to XML. Our RIXML contains
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
public static bool CheckLogin(string Username, string Password, bool AutoLogin) { bool LoginSuccessful; // Trim
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.