1
vote
3answers
120 views

Can I programatically move sites or content between 2007 and 2010?

Using the SharePoint Object Model on a SharePoint 2007 environment and the remote object model to talk to a SharePoint 2010 environment would it theoretically be possible to migrate sites or content ...
0
votes
2answers
323 views

How check if a site (not site collection) has sub sites in it? [Object Model]

I am trying to figure out a way to check if a Site inside a Site Collection has sub sites in it. To get sites inside a site collection, we can use the below code. foreach (SPWeb siteobject in ...
1
vote
0answers
179 views

Unable to seperate normal and hidden folder such as “Forms” [SPFolder Object Model ]

While performing certain task in a console application, i am unable to separate normal folder and hidden ones such as "Forms","FormServerTemplates" etc. I am using SPFolder in the obejct model. I have ...
0
votes
1answer
248 views

Getting Library contents along with Folder structure [Console application using Object Model]

I am developing a console application which will get all the files in a document library and copy it to a particular location on system. I was successful in retrieving all the files within the ...
0
votes
0answers
396 views

Cannot remove file <x>. Error Code: 16388

I've written a tool top copy/paste/delete files accross site collections and then remove the original version from the recycle bin. The method to copy the files is: public bool ...
1
vote
1answer
72 views

Checking SharePoint Uptime Remotely

I was wondering how people have gone about programatically checking if SharePoint is still available? I use the following now to check it, but it relies on the SharePoint object model and must run on ...
0
votes
1answer
141 views

Invalid URI when trying to empty recycle bin

Based on this question I wrote the following in my class for emptying the recycle bin: public static void EmptyRecycleBinItem(string siteCollection, string originalLocation, string filename) { ...
2
votes
1answer
288 views

Is there a way to only clear a specific item from the recycle bin?

I know I can empty the recycle bin for a site collection with the following: public static bool EmptyRecycleBin(string siteCollection) { try { using ...
0
votes
1answer
2k views

Copying items from one list in one site to another in another site?

I have a class that I've been working on to allow me to move items in SharePoint, whilst retaining meta data. The class is as follows: public class Lists { /// <summary> /// ...
2
votes
1answer
260 views

SharePoint object model

I'm looking for articles on custom model mapping for Sharepoint (2007 / 2010). Google's not returning a lot of hits on this, are the any articles out there? Best practices, mapping and such? I'm ...
2
votes
1answer
297 views

Why do I sometimes have to use different SPQuery tags?

Every SPQuery's query should have <View><Query> query... </Query></View> tags? Sometimes I have to put without those tags to get it work and some times I have to put it ...
1
vote
1answer
741 views

Programmatically enumerating Web Part Zones of a Publishing Page Layout

I have a situation where a class I have is passed a PublishingPage instance and I want to enumerate any and all web part zones that are used in the Layout Page for this page. This is proving tough. ...
0
votes
2answers
320 views

Sharepoint 2007 Current User ObjectModel

I'm trying to use the object model of Sharepoint 2007 to make some changes over a list and read users and groups web settings... For that I developed a Web Service (WCF) that is stored in the same ...
0
votes
2answers
927 views

SPList.GetItems(query) does not return SPListItems where the permissions are not inherited

I'm using the following code: protected void TraverseFolder(SPList list, SPFolder folder) { SPQuery qry = new SPQuery() { Folder = folder }; SPListItemCollection listFolderItems = ...
2
votes
2answers
467 views

How to enable custom ordering on a list?

I want to be able to create a list programmatically which allows end users to reorder the items in the list. There appear to be 2 steps to this. Firstly set the SPList.Ordered property to true - this ...
1
vote
2answers
1k views

Can I export a SharePoint 2007 list to an Excel file subdivided into separate worksheets?

We have a SharePoint 2007 deployment which will have a substantially large document library. My client wants the ability to export this library to an Excel spreadsheet, but specifically wants the ...