document-library

Dynamically display Edit Control Block menu item in SharePoint

I am trying to set up dynamic per-item menus (Edit Control Block) in SharePoint 2007. My goal is to have certain features that are available based on the current user's group membership. I know that the CustomAction tag that controls the creation of this menu item has a Rights attribute. The problem that I have with this is that the g...

MOSS 2007 Document Library - choice column not displaying selected value

I have something funky going on with MOSS & was wondering if anyone out there has seen anything like it: I have a document library in MOSS that has several custom columns added to it. I have a column of type choice. For one document in the library (a word document), the selected value does not get displayed for the one column - all of...

Monitoring a SharePoint document library

I was wondering if there was a good way to monitor a document library on SharePoint for changes (new files added, files changed / checked-in, files deleted, etc.) Basically, what System.IO.FileSystemWatcher does on local / network directories. Are there events that get fired when documents are uploaded to document libraries? Perhaps c...

How do you change the address of a document library?

I have a site with multiple document libraries in it. One of the site users has full control of the site & at one point, instead of creating a new document library, they renamed the default document library from "Shared Documents" to "Correspondence". Now they've opened the document library in windows explorer, so it's added an entry i...

How to efficiently delete all files in a document library?

I am looking for a clear, complete example of programmatically deleting all documents from a specific document library, via the Sharepoint object model. The doclib does not contain folders. I am looking to delete the documents completely (ie I don't want them in the Recycle Bin). I know of SPWeb.ProcessBatchData, but somehow it never ...

SharePoint Visual Studio document upload Web Test fails with Connot close stream until all bytes are written

I have created a Visual Studio 2008 sp1 test suite web test that uploads a document to a document library in SharePoint. The test is a lot like the one described here. All is fine until the test is converted to a coded web test. Then the upload post returns the response "Request failed: Connot close stream until all bytes are written"...

Communicate with Document Library Browser Web Part

Background My task is to, in SharePoint, show an image of a process map which should be clickable. Think of an imagemap in html. Some areas take you to other process map images and other brings up a pop-up window. "Connected" to each process map is a set of documents. These documents are stored in a document library. There are one proc...

Using a sharepoint document library, how can I create 'permalinks'?

I want to be able to link to sharepoint documents without having to refer to the document name which may change. Is there anyway to programmatically add a unique key to the meta-data and then somehow use this in a link? ...

Upload document to specific folder in a SharePoint Document library using WebClient

I have some client side code that uploads an Outlook email to a document library and as long as the path is pointing to the root of the doc library it works just fine. @"https://<server>/sites/<subweb>/<customer>/<teamweb>/<Documents>/" + docname; is the projectUrl in this function : public bool SaveMai...

How to create a shared document library in SharePoint that can be used in subsites?

We want to create a common document library on a certain site level and then create views on that document library in the different sub sites? Is that possible in SharePoint? Can it be done declaratively? Rine ...

How to create a lookup column that targets a Doc Lib and uses the 'Name' of the document?

How do you create a lookup column to a Document Library that uses the 'Name' of the document as the lookup value? I found a blog post that recommends adding another custom field like "FileName" and then using a item reciever to populate the custom field with the value from the Name field but that seems cheesy. Link to the blog in case p...

Script to delete files older than a day in Sharepoint document library

I need a script which can delete all files which are older than a day and this script needs to be invoked every day automatically in the Sharepoint server. How can i do this and any hints as how to write the script? ...

Sharepoint Doc Lib Content Types

Hey, So I would like it when a user creates a new folder in my sharepoint document library that 4 template documents also get added inside the new folder. I get that the user could just click on the document template for each template individual but I want them added all the time. There doesn't seem to be an option to add template d...

Drag and Drop files into a SharePoint webpart to upload into DocLibrary

Is it possible to create a SharePoint (wss3 or MOSS 2007) webpart, to allow files to be dragged and dropped onto it, which would then upload the files into a predefined document library ? I imagine that this would require some form of client side scripting (Ajax ?), but my knowledge in ajax is a bit sketchy. From my exploration so far...

How to modify Sharepoint filetype icons depending on parts of the filename?

We have a SharePoint Document library, where we store html files with links to external files. Samples: mypicture.jpg.html mywordfile.docx.html mypdffile.pdf.html and so on. Now by default all Files show up with the HTML Icon, referenced in the DOCICON.XML file. Thats of course correct as the .html extension shows, it is a HTML file....

Update Files in Sharepoint Document Library

Simply put, I have a custom editForm.aspx in a document library, that uses my own custom dll. When a user edits a record, I can update all the properties associated with the file, however, when you update the actual document(ie replace it) and then Update() (Or SystemUpdate()), you get the following : The file BLAH.doc has been modified...

Organising large Doc volumes in Sharepoint

I need to upload into Sharepoint around 100,000 (MS-Word) documents that are currently on a file server - added over the past 7 years. I've read that a sharepoint Document Library should really be limited to 2,000 documents, and that there are performance issues once this is exceeded. I've thought about creating a Doc Library for each c...

Sharepoint User Favorite Documents

Our Sharepoint site functions as a sort of document library, with users able to browse but not edit any document added. What would be really useful is if users were able to individually mark as a document as their "favorite" and then have a list somewhere so they could go back to see it. Is there a "feature" or a custom extension that wo...

How to create a custom document library in SharePoint?

Howdy, I am wanting to create a Custom Document Library for the purpose of targeting a custom action feature to the Custom Document Library's New Menu. I have found many different guides on the internet, but you know how old those can be. So what would be the "correct" way to create a custom document library in SharePoint 2007. T...

How do I rename a file using the SharePoint web services?

I have a custom definition for a document library and I am trying to rename documents within the library using only the out of the box web services. Having defined a view with the "Name" field supplied and trying the "LinkFilename", my calls to rename a file are respectively returning a failure or ignoring the new value. How do I rename...