Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Easy way to add a folder?

Status
Not open for further replies.

Liamraz

Programmer
Jan 8, 2005
3
US
Hi,

I'm looking for an easy way to add a folder into Livelink using VB/LAPI. Something along the lines of AddDocument would be great.

I'm currently using CreateObjectEx, but I can't grasp the createInfo just yet...

Any clues would be appreciated. Thanks!
 
Actually the concept is very easy.Evrything (folder,document,project,livereport) is a node in livelink which you create by using the subtype to the function.When yoy speciffy documentsubtype a document node(144) is created when you specify foldersubtype(0) a folder is created and like wise.The AddDocument function is like you say a one shot way of creating a document and adding content but it has severe limitations so the right method is really CreateObjectEx itself.
Code:
This shows you how I use the AddDocument call 
[URL unfurl="true"]http://www.greggriffiths.org/livelink/development/lapi/drlapi/two/[/URL]
Code:
[URL unfurl="true"]http://www.greggriffiths.org/livelink/development/lapi/catAttWhatHaveYou/[/URL]

in that piece of code see how I use the CATEGORYSUBTYPE
in your case it would be the foldersubtype.Check the lapi docs for  what those constants are.

status =doc.CreateObjectEx( volumeID, objectID, LAPI_DOCUMENTS.OBJECTTYPE, LAPI_DOCUMENTS.CATEGORYSUBTYPE, catName,


Well, if I called the wrong number, why did you answer the phone?
James Thurber, New Yorker cartoon caption, June 5, 1937
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top