Auto Approving Documents in SharePoint Document Library

Ok so this sounds kinda strange right? You ask the question why would you want to auto-approve documents in a library where there is approval set on the document library.

Well my scenario is this, I have project documents some which need approving and then some that don’t. I hear you say why not just have 2 document libraries for this, well I could but I setup some views to group the documents by content types / columns and to avoid customising SharePoint by creating a content query web part with custom XSLT I looked into using a SharePoint Designer workflow to accomplish this.

The other thing to remember here is that I have setup the document library to only show readers major versions of documents to readers of the document library. I also have the require checkout before editing the document enabled. See the screenshot below for advanced settings for the library:


So I have indentified specific content types that do not require approving and need to auto approve these documents. My challenge here is that once the workflow tries to change the document to ‘Approved’ it may see that the document has been modified and then change it back to ‘draft’, the document also needs to be checked out to make this change so this could cause a problem.

So below shows the step I created to attempt to update the approval status.


So here was the first attempt at running the workflow which failed due to the document not being checked out


So adding check out and check in around the update of the approval status is the next logical step.


And this was the error I got – unknown error – very helpful!


So I concluded that the only way to do this was to set ‘Require Check Out’ to ‘No’ under version settings for the document library.


And…. It worked - success!

So to conclude you can’t auto approve certain content types in a document library with ‘Require Check Out’ enabled for the document library. From a business impact disabling this option could result in multiple people editing the same document so this would need to be considered vs. the inconvenience of documents remaining in draft when they don’t need approval.

Using Google Analytics with Internal (Intranet) SharePoint Sites

This article applies to both MOSS and WSS and is very easy to implement.

You may ask the question how does Google know about an internal user accessing a SharePoint site, well its simple. The Google script that runs is done so every time a user accesses the site and is therefore client side so it is the client session that registers the hit with Google Analytics (GA).

To implement Google Analytics successfully you will firstly need a GA account. From this account enter the SharePoint URL e.g. HTTP://intranet (don’t worry about Google resolving this to your SharePoint site because obviously it won’t!) follow the instructions and you should generate some code similiar to below:

<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "
https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "' type='text/javascript'%3E%3C/script%3E"));
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-XXXXXXXXX-X");
} catch(err) {}</script>

Copy the code and place this into the active for your SharePoint Site under the <HEAD> section and not just above the </BODY> section as is suggested in the Google walkthrough.

Hit the pages a few times and then keep checking your GA for stats. It will take up to 24 hours to update these stats however when you first implement your code the GA site will show a yellow warning triangle suggesting the analytics code hasn’t been installed, after a couple of hours this should change to confirm it has.

Wait 24 hours and you should then see some results come through and you’re done!

Credit to Mike Knowles blog for his excellent guide on this.

Connecting SharePoint RSS Viewer web part to a SharePoint List RSS Feed

If you’ve ever tried to connect an RSS Viewer web part to a SharePoint List on the same web app / site collection you may have received the following error when you try to enter the feed:

The RSS webpart does not support authenticated feeds.

So from a quick browsing of the web I found very little that updated on Mark Arend’s blog. This talks about the need for Kerberos authentication if you require the list supplying the RSS feed to require authentication rather than allowing anonymous access which may or may not be an option depending on the uses of SharePoint.

Kerberos is somewhat a little challenging to setup and if you do need to have authenticated feeds there are some great Kerberos overviews for SharePoint by a colleague of mine Mike Cox which you can check out here. Just so you know enabling Kerberos in SharePoint isn’t a case of just enabling the option in Authentication Providers in SharePoint Central Admin.

SharePoint Web Servers not propagating newly created websites / web apps

I recently had a scenario where web apps I’d created in my new SharePoint farm were not propagating to other servers in the farm.

To give you a little background the WFE and APP servers we’re in separate network segments running Windows 2008 R2 and therefore there was firewall restrictions between the segments.

After trying the usual IISRESET and restarting the services I realised that ports 56737 and 56738 were not open inbound on the servers to created a GPO for the firewall rules. After this still nothing so on the servers where the web apps had not created I restarted the WSS Web Application service from the servers in farm page on SharePoint Central Administration and the web apps appeared – problem solved!

SharePoint 2007 Meeting Workspace sub sites workaround

I recently noticed that when creating a SharePoint Multipage Meeting workspace there is no option to create further sub sites!
I appreciate this is due to navigation issues for end users however I recently had a request to facilitate where possible out of the box SharePoint functionality.
So the workaround is a little bit of a cheat but it works so basically take the layouts page on another site for creating a site/workspace link which is:
Copy this to the end of the meeting workspace and this will allow you to create a new sub site below your multipage meeting workspace:
E.g. http://sharepoint/site/_layouts/newsweb.aspx

Emailing SharePoint 2007 Email Enabled Lists from Distribution Groups Not Working - Workaround

Ok so here’s the scenario. I’ve setup incoming email on SharePoint with an excellent whitepaper provided by Steve Smith from Combined Knowledge.

So I have a SharePoint 2007 Farm with Exchange 2007 server and have successfully created incoming folders on SharePoint which successfully creates email contacts in an OU in AD so all good so far!

The list would happily accept emails from other email accounts if emailed directly however adding the newly created contact to a distribution group in Exchange and sending the mail via the Distribution Group would fail. I managed to come across this blog post and this solved the problem: 

Basically deleting the contact SharePoint created and create one in Exchange adding this to the distribution group works!

I’d be interested to hear from any Exchange admins as to what is different in the creation of a contact in Exchange and that created by SharePoint.

Access Denied Trying to Access SharePoint 2007 Shared Services Provider using SSP Service Account

I recently had an issue trying to attempt to access certain pages in the Shared Service Provider using the service account that runs the SSP!

Thanks to my colleague Ashkan for assisting me with this issue. Basically for some reason the account was not a member in areas it needed to be so I thought I’d write a blog to remind myself if this happens again and also help others struggling with this one.

Firstly I just want to make clear this issue is not due to the LSA registry setting described in a previous blog of mine here.

The SSP service account needs to be a member in the following locations:

  1. Site collection admin for SSP Web App
  2. SSP->Personalization service permissions (I checked all options)
  3. Central Admin->Application Management-> Policy for Web Application (I chose Full Control)

This resolved the issue and I was then able to login!

I also posted my issue on TechNet forums and replied with this blog to close the loop.

SharePoint Person or Group Multiple Selections People Lookup Field Disappears from SharePoint Designer – Workaround

I was recently asked to create a workflow for up and coming events. The requirement was to send an email to all attendees 2 weeks before the meeting was due to start.

I’d previously attempted a similar task in a previous blog which I never managed to resolve but thought I'd give it another go.

This post doesn’t cover the workflow see here for the full blog post. This blog entry covers the multi people look up column and an issue I found when trying to use the column in SharePoint Designer and how this was resolved.

So firstly I created an attendees column for the calendar entry as shown below (noting that ‘Allow multiple selections’ is set to ‘No’)


This will allow for the value to be selected from SharePoint Designer. However as with most meetings I've attended they generally involve more than one person so there is need here for multiple persons to be entered in this column - this is where the problem comes in! If you change the value of ‘Allow multiple selections’ is set to ‘Yes’ you can no longer select this field in SharePoint Designer Workflow.

The way to workaround this is to create your workflow with the option set to ‘No’.

Test your workflow and make sure it achieves the results you set out to and believe me you will need to test it more than once before you get it right. Then once you have tested and emails are successfully sent to the recipient change the value to ‘Yes’ and you can now send email to multiple people using SharePoint Designer workflow.

SharePoint Designer Reminder Email Workflow

I was asked to design a workflow to extend the out of the box functionality to email meeting attendees 2 weeks before the meeting is due to start. Firstly create a SharePoint calendar list called ‘Events’.

The out of the box editable calendar columns are displayed below:


For the workflow you need to create two additional columns for the events list:

  • Calculated field called Reminder (Date and Time)
  • Person or Group called Attendees

The calculated column settings can be seen below basically offsetting the Start Time by 14 days (2 weeks) as [Start Date] – 14.


Then create the Person or Group column as shown below making sure that the ‘Allow multiple selections’ option is set to ‘No’:


If you create a new event now you will see an additional field for the Person or Group


Notice that the calculated field does not appear here as this is not an editable field and will automatically calculate in the background.

Next step is to open SharePoint Designer and create a new workflow (I’m assuming if your reading this post you have some level of understanding of SPD and will not be covering this step for step).

You will need 2 steps for the workflow. The first is to check date and pause the workflow if the date is not equal to Start Time – 14. The second step is once the Start Time does equal 14 days before event then send the email.

On the new workflow set the values as shown below:


Step 1 – Check Date


So the above basically checks if Reminder (14 days before event) is equal to today. If not then it pauses until the Reminder does equal today.

Step 2 – Send Email


In this step the action is again to check for the Reminder date equals today. Then send the email.


The email is where another blog post of mine discovered an issue and can be read here. The  workflow sends an email to the the current items Attendees. The subject is also the title of that specific meeting. I also added some text to the main body where you could customise the email further by adding lookup references specific to that event such as start time etc.

Once you’ve created the 2 steps click finish and navigate to the event list and enter a new event 2 weeks away and make sure you set it for 5 minutes ahead so you have time to save the event.




(This is not my actual diary!)

If you select the new entry created and select workflows you should see:


And if you click on ‘InProgress’ this will show you that the workflow is paused for 5 minutes and will then send the email:


That's it job done and expect to see an email in your inbox reminding you.

Hope that's of some use!