Seeing the old version of a document when using a previous version of office

August 10, 2006 at 4:13 pm | Posted in SharePoint, SharePoint 2003 | Leave a comment

This is a small issue, but it comes up occasionally… doesn’t happen if you’re working with Office 2003, but a lot of people are not.

If you are working with Word XP, the following may happen. You click on a document name in a document library and view the contents. You decide that you’re going to edit the document. So, you close it down, and then use the “edit in Word” feature of the document libraries. You make your changes and save, and close.

Then, you reconsider your changes, perhaps you just want to re-check the document, so you open it up just by clicking the link to open it in read only view.

Most likely, you’ll see the version of the document from before your edits. I’ve had a few distraught phone calls from users who experience this. The edits have been saved however, whats happened is IE has opened the locally cached version of the document from your first viewing.

If you shut down all your browser windows, open a fresh browser, open the document, you’ll most likely see the correct latest version.

So, whats the fix? Well, as documents are delivered by owssvr.dll, there’s only so much you can do. In IIS, specially on the owssvr.dll file, I disabled the default caching rules and added ‘cache-control:no-cache’ to the http header. Problem fixed.

But, (and it’s a big one) do you really want to disable caching on all your lists, web part pages, and documents? Probably not. Owssvr.dll is responsable for all these pages. (check out your iis logs) I’ve not done detailed performance checking on this, but it can only increase the workload of the server. How significantly is difficult to say.

Perhaps there is a more subtle cache-control command I could add to the http header as ‘no-cache’ is a bit of a sledgehammer, but it’s worth checking how common an issue this is before making such a change.

Either way, I’m glad I found out why it was happening…


LCID for the UK when working in Frontpage 2003

June 14, 2006 at 11:34 am | Posted in SharePoint, SharePoint 2003, SharePoint 2007 | Leave a comment

1033 may be the LCID for english, but it also carries with it the US mm/dd/yy date format. If you're working with frontpage developing a dataview web part and can't get the date to display as the UK dd/mm/yy, put 2057 in the locale parameter. 2057 is UK English.

Retrieving documents from SharePoint 2003

June 13, 2006 at 11:04 am | Posted in SharePoint, SharePoint 2003 | Leave a comment

SSA has created a great tool for pulling word documents from SharePoint. I won't repeat all the details that he has documented on his own site, but this has the potential to develop in to an essential maintenance tool.

Running code after creating a site

May 23, 2006 at 12:24 am | Posted in SharePoint, SharePoint 2003 | Leave a comment

This might seem like quite a trival feature, but it's actually very powerful. It is effectivily an event handler for the "create site" action, which up until now I thought didn't exist.

I typically don't link to other blogs as you'll probably find those yourself anyway, but I thought this was so useful I'd make an exception.

Macaw Reskinner

December 18, 2005 at 7:50 pm | Posted in SharePoint, SharePoint 2003 | Leave a comment

Wow, a whole year. More even, 13 months. How can so much time pass without a blog posting? Perhaps I got lazy. There are so many great SharePoint bloggers out there now, I didn't feel the need to post information. I also didn't want to become an "echo" blog, repeating the latest news that so many blogs seem to do. I like to think that as my role became one of project management, I didn't really come across many technical insights to share with the world.

But anyway….

You certainly start to become more attuned to the business challenges, and consequences, of implementing SharePoint, but you feel that you can't really post on work that is internal to a company.

However, there is on thing that I have come across recently that I should definitely mention.

The one thing everybody comments on, and Microsoft assures us is fixed in the next version, is options that people don't have permission to use are presented to every user. The other is the administration headache of making changes to layout. The amount of files you end up having to change is huge, and you can't help feeling that you're almost breaking SharePoint as you make those changes to allitems.aspx etc etc.

A long while ago, I posted on how difficult the problem of customisation is. It received a lot of comments. I guess many people had the same problems. However, one comment offered a solution that had been proposed before, but never implemented until then.

Alas, I didn't take the time to research it as it wouldn't have helped me then. But someone else did, and commented back on the same article, very positively. Recently I faced some challenges in an implementation, and my memory brought those comments to mind.

Essentially, Serge van den Oever created a httpModule that uses regexp to edit html on the server, after it has been generated by SharePoint. This means you can edit the html of SharePoint web pages, on the server, without touching a single SharePoint config file or .aspx page, before they are sent down the wire to the user. While it may add overhead to your processing time, it is a beautifully clean solution, compared to the alternatives I have seen ( and implemented) before.

That text and those links generated by locked down Microsoft dll's can now be search and replaced away by a simple regex. If for example you're one of those people needing to strip away that site settings link across all WSS sites on a server, I would recommend trying this out. The package can be downloaded from gotdotnet.

Data View Web Parts

November 14, 2004 at 7:16 pm | Posted in SharePoint, SharePoint 2003 | 4 Comments

Although in my last post I mentioned SharePoint from the project management perpective, here's a tip that's purely development.

One thing that winds me up is how SharePoint deals with ghosted pages. As soon as a page is unghosted it's lost to any future template changes. If you unsure to what unghosted pages are in SharePoint let me assure you they are "a bad thing".

Now should you wish to create a data view web part from an existing list, you have to do it in FrontPage, and you have to then hit the save button, unghosting it and casting the page down in to the 7th circle of SharePoint annoyances.


You first create a new web part page, and place your list as a web part on that new page. Then in FrontPage convert it into a Data View web part and do all the customisations you wish. Once done, hit save.

Then visit the page in Internet Explorer. Modify the properties of the data view web part and you'll see the three buttons in the toolpane that displays the properties on the data view web part (Source Editor, DataQuery Editor, Parameters Editor). Open each property window and copy and paste the values to 3 local text files.

You can now delete the web part page and the data view web part it contains. (Although I'd recommend waiting until you know this whole process has worked)

Now go to the page you really want to display the data view web part on.

Drop an empty Data View web part in to a zone. Open the toolpane, and for each property button paste in the values from your local text files.

You'll now have your customised Data View web part, and no unghosting will have taken place!


What’s that? You don't have an empty Data View web Part? Ah.

Right-click save target as on

Copy it in to your wpcatalog folder under the sites’ root iis folder and you'll then find it under the Virtual Server gallery.

Alternativly you could export the web part to a .dwp file off the temporary web part page and then import it to the destination page. This is certainly an easier method in the short term, but I've found having an empty data view web part in the Virtual Server gallery quite useful.

Any feedback gratefully received…

Back from holiday

November 13, 2004 at 1:13 am | Posted in SharePoint, SharePoint 2003 | Leave a comment

Ok, so I wasn’t actually on holiday for 3 months, but on my return I started a new job project managing a SharePoint implementation rather than acting as a technical consultant.

A very different way of working.

While tech knowledge helps in that role, you obviously spend much less time dealing with code and .aspx templates and the like, which has left me with not so much to publish.

I have had quite a few circumstances where I’ve had knowledge that would be useful to post, but as a project manager, you’re not in the frame of mind where your instinct is to rush to your blog. Your responsibility is to resolving problems and keeping the project on track.

I’m going to try this method of posting to my blog via email, and perhaps posting SharePoint thoughts from the perspective of a project manager.

Modify Shared Page

August 14, 2004 at 8:31 pm | Posted in SharePoint, SharePoint 2003 | 5 Comments

Ok, just before I go off on holiday for a week, here is a quick post on something I’ve been using for a while.

If anyone out there has been wanting to edit the drop-down that decends when the “Modify Shared Page” box is clicked, here is one quick and easy method.

The structure and options of the menu are actually a small xml fragment embedded in the html source of each page. Simply by editing the xml you can edit the menu. Microsoft use this technique on many of their web sites.
Here is an example javascript function that will add the create link to the bottom of the drop-down.

function updateMenu()
//get a reference to the XML fragment
//team workspace menu
var oNode = document.getElementById(‘MSOMenu_SettingsMenu’);
//meeting workspace menu
oNode = document.getElementById(‘MtgMenu_SettingsMenu’);
//check it exists
//append an additional node to the xml
oNode.innerHTML = oNode.innerHTML + ‘<ie:menuitem type=”option” onmenuclick=”javascript:window.location=\’_layouts/1033/create.aspx\’;”>Create</ie:menuitem>’;

You can write any javascript functions you like, and have them executed by the onMenuClick property of the menuitem node.

If you want to get ambitious, you can define sub-sections, icons, in fact pretty much re-write the whole menu. Have a look at the xml fragment to understand it’s structure and properties. If you have difficulty finding it, search on the text ‘MtgMenu_SettingsMenu’.

Now, how do you run this javascript on the page? You can either create your own update.js file, and then edit every .aspx list and web part page template to include a reference to the js file. Or, add your function to the file ows.js as it is already referenced by every page.

Additionally, you have to ensure the updateMenu function does not execute before the xml fragment has been written out in the html. You can either:-

  • Use the onload event to fire the command. Alas, some sharepoint pages already use onload, and you risk damaging native functionality with this method.
  • Use setTimeout(‘updateMenu()’,500); Here, you are dependant on the end user having downloaded the page completely within your specified time delay.
  • Edit each .aspx template and ensure the updateMenu() command is the last processing instruction on the page. Low risk, but a significant amount of work, and vunerable to Microsoft updates to SharePoint.


  • In either method, you are changing pages that will potentially get over-written by a SharePoint patch or update from Microsoft. Bear this in mind when choosing in which files to place new javascript functions.
  • If you do declare a path similar to the one “_layouts/1033/create.aspx”, be aware that that it will not always be valid with respect to the page the user is on, particulary in the case of web part pages. I believe I have a solution for this, but I haven’t investigated it yet.
  • If you edit ows.js, it will effect every site on the server, you may need additional logic in the javascript to ensure additions are only made for certain sites, for example testing the domain name.

I’m sure others out there can think of ways to minimise the risks of running client-side javascript in this way, and perhaps increase the functionality of the updateMenu() command.

Make more posts

August 7, 2004 at 4:54 pm | Posted in SharePoint, SharePoint 2003 | 1 Comment

A couple of weeks ago I dropped a comment on Maurice Prathers blog about using http compression on sharepoint. This is something I consider almost essential for any sharepoint site, regardless of your connection speed to the server.

It looks like he took it up, and and has written a great post on how to implement it. Which of course made me feel very lazy in not making an effort to post the info myself *note to self, post info*.

He has also published very detailed info on the resulting performance.

my only comment is that he may have set the compression level a bit too high..

UPDATE: Maurice has updated his article showing the performance benefits of using level 9 compression.

great post Maurice.

Portal Alternate Header

July 11, 2004 at 12:13 pm | Posted in SharePoint, SharePoint 2003 | 25 Comments

I received a comment from Sunil on SharePoint customisation, and I decided to make a post of of my reply. It was great to receive a comment, firstly furthering the sharing of knowledge, secondly it's great to know that someone is reading my blog! Hey all you lurkers out there, drop a comment sometime, it's the sort of thing that motivates us to post more information.. 😉

anyway, back to the question…

is there any way where I can change the home page of portal server and all following site pages ( not my sites) will have the same. I tried the alternateheader, but I don't know where I made the mistake none of the pages got changed or no changes error happend also. no change.

There are a couple of options available to you with SPS. You can specify an alternate image for the top corner, and an additional CSS stylesheet through the SharePoint administration interface. However it sounds like you want more substantive changes.

WSS sites are created from a single template, either STS or MPS. However SPS sites are made up from multiple templates under the system 60 directory :- SPSBWEB, SPSCOMMU, SPSNEWS, SPSNHOME, etc..

Thus, any changes you make must be made to the ONET.XML file must be made to all the SPS?????/xml/onet.xml files. Additionally, they must be made before you create the portal site.

However, the Portal ONET.XML files already have an alternate header defined, "PortalHeader.aspx" which you can find in the layouts/1033 directory (presuming you are using the 1033 locale). So, you can edit that file to implement changes to the portal header.

Except, no, you can't really.

Without going into great detail on the SharePoint architecture, all sharepoint pages are based on an .aspx template somewhere under the /60/ directory. Some of those templates contain a line of code saying:-

string alternateHeader = SPControl.GetContextWeb(Context).AlternateHeader;
if (alternateHeader == null || alternateHeader == "")

Pages that contain this statement will show any changes that you make to PortalHeader.aspx. Pages that don't, won't. Unfortunetly the only pages that have this statement are admin pages under the layouts/1033 directory. Even then, its not all of them.

Pages that the end user sees run under a different architechure to the administration pages. So how do you edit the header on these pages? So far, the only method I am aware of is to edit every single template file. There are about 100 per language for STS sites (web part page and list templates), I haven't worked out how many for portal sites, as I'd rather not even think about it. The most managable solution I have found is to use a javascript include that manipulates the DOM client-side at run-time, but this is only suitable for minor edits.

Anyone who has found how to use an alternate header properly across all pages, please raise your hand. Much kudos is available to whoever can draw the sword of customisation from the stone of SharePoint.

Next Page »

Blog at
Entries and comments feeds.