So, I went to the SUGUK meeting last week on the 16th at LBi’s Truman Brewery building on Brick lane. I was looking forward to it, though was disappointed to find that the brewery is now offices. Anyway,the subject was WCM best practices with Chris O’Brien and Riaz Ahmed, who’re always entertaining speakers. Continue reading “SUGUK Meeting: WCM Best Practices”
SP2007
Regarding SharePoint View Styles…
I had to explain to one of my colleagues that SharePoint Lists could be presented as more than just, well, lists – so here are my examples… Continue reading “Regarding SharePoint View Styles…”
How well does SharePoint work with Chrome?
Well, Google has launched the next broadside in the battle between Redmond and the Googleplex – their own ‘Chrome‘ Browser. Creating a browser makes a lot of sense for Google, really – IE7 had ‘Windows Live’ as the default search provider for the Search box, so Microsoft were clearly starting to try and leverage their ownership of the desktop, and the browser on it (which, of course, is leveraging their ownership of the operating system – though having a web browser integral to the OS seems bloody stupid to me!) And yes, you can add Google as a provider, and set it as the default (I always do) – but it’s effort, and a bit scary for my granny, you know?
Anyway, I found myself wondering – how does SharePoint work with Chrome? We know Chrome is based on Firefox and Safari and other bits – but how well would it perform. The short answer – not bad…
Continue reading “How well does SharePoint work with Chrome?”
Can you sync a Pages library with Outlook?
An interesting question from one of my colleagues:
Can you sync the Pages list with an Outlook 2007 folder and still be able to read the HTML without the MOSS CSS and XSLT stuff?
Well, my gut feel was no, but I thought I’d take a look.
I found that the Connect to Outlook option was available on the Pages library settings, so I thought I’d give it a try.
As we can see, we do have the Pages library synched, and you can see the pages within, but Outlook doesn’t know how to display them. I’m not surprised to be honest; I suspect that the default.aspx item actually just contains the data for the page – but isn’t yet rendered by the page layout or page. Still, one way to find out – open it and take a look:
Yup, there you go – the XML of the page ListItem, and not a nice, rendered page with all the layout, master page, styles and stuff. Not really surprising, to be honest, but it would be nice if it did. I can’t think of how it might do that though – clearly the whole browser page would need to be rendered. An alternative would be to generate your pages via the Document Conversion Service, and to synch with the source documents themselves, rather than the pages.
Outlook 2003 to SharePoint 2007 Email Integration
So what has Andy been working on lately? Well, lately I’ve been writing an integration between Outlook 2003 and SharePoint 2007. It was all a bit fraught – some of the web services I was using are a bit dodgy, uploading files and metadata as one transaction doesn’t seem to be possible, and everyone always underestimates the effort involved in coping with the metadata about an email. I’ve written an integration between GroupWise 6.5 and Open Text Livelink before now, and again, dealing with the metadata was a bigger effort than browsing the system or uploading the document.
Now, email saving into SharePoint seems to be an overlooked thing. Microsoft have their Exchange 2007 Managed Folders, which can push emails into a SharePoint Records center. Liam Cleary has written his usual high-quality description of setting it up, and the MS Records management team blogged about it in parts I, II, III and IV.
However, a lot of our customers aren’t impressed with this solution. They want to be able to save emails into particular SharePoint Libraries within their usual collaboration environment, rather than just booting them off into a Record Center.
U2U built an Outlook 2007 addin which is very nice – though a bit of a different take. Their approach requires defining the save location up front and mapping to the data, but that then saving emails is dead easy – just drag them into the folder. Nice.
Anyway, this is what I built – I’ll contrast with the U2U offering lateer…
Continue reading “Outlook 2003 to SharePoint 2007 Email Integration”
Finding Related Pages in SharePoint…
A neat feature of the Publishing features is being able to see the items related to a page. To see this, go the the Site Actions Menu > Manage Site Content and Structure.
You should then see a window like this:
Use the left pane to browse your site collection, and the right one to select the item you want to see the related items for. Then click the ‘Related Items’ button:
This should then show you the page with a third pane, showing the related items and the nature of their relationship, where they’re located, and so on…
Web Part for showing subsites
This is kind of obvious, but why isn’t there a web part for showing subsites?
Sure, there is the ‘Table of Contents’ web part, but annoyingly that shows other things in the site, like lists and libraries, rather than just child sites. And there isn’t any setting I can find on it to make it behave that way – which also seems a pretty obvious feature. So annoying – 90% there, but not quite.
Well Chis Johnson has has the same though and made an example. I’m not entirely convinced about creating the output string in the property (that’s a bit bizarre Chris), but it’s a good start.
I guess it’s another bit of a gripe about out-of-box navigation in SharePoint
Document Conversion Service doesn't map column data – Part II
(For the purposes of this post, I’ll use Pages with a capital P to mean items in SharePoint of a Page content type, or a child content type of Page. I’ll also refer to all content types in italics)
Previously, I found that the document conversion service doesn’t map site column data from the Document type to the Page type. So, what are our options?
- Get users to fill in the metadata for the converted document
- Put the metadata into the Word document
- Bespoke coding
- Don’t use the conversion service
Let’s look at each in turn.
Get users to fill in the metadata for the converted document
Well, the first option is pretty obvious – get the users to fill in the Site Columns for the converted document’s Page. In my case, this would mean filling in the AWBText column on the ConvertableDocumentPage type. This will work! Unfortunately this means that the page and document’s data is not linked – a change in the AWBText field won’t be replicated between both items, or even just pushed from the ConvertableDocument the next time it’s converted. That sucks a bit, but this might be a valid option.
Put the metadata into the Word document
The second option is quite neat – Word document can have ‘Quick Parts’ – some of which are document properties, and this can be connected to the columns of the content type:
You can put these into the document itself. They’re like document ‘Fields’ in Word pre-2007, but these are much, much better. For a start, you can actually type into the quickpart and it’ll update the document properties – and when you save the document to SharePoint it’ll update the columns of the library! Very cool. Anyway, I updated my Word template from my previous example…
I then created a new document. Note that the AWBText field in the Document Information Panel and the Quick part is linked – I typed in the value in the document and it was reflecting the Document Information Panel.
I then converted these document. This resulted in:
Okay, so I’ve scribbled on this a bit. The area outlined in the purple-pink colour is the content of our document that we converted. You can see that this includes the value of the ConvertableDocument‘s AWBText column. Hurrah! However, above this is the value of the AWBText column on the ConvertableDocumentPage – and it is still empty. In other words, the original document’s metadata is now in the page content – but it still isn’t stored against the Page as metadata. This isn’t really suitable for our customer – they need that column data against the Pages for their navigation. Bah!
Bespoke Coding
Okay, I started to wonder if I could fix this via custom code (i.e. some sort of Feature). I dug through some of the hidden properties of my source ConvertableDocument and destination ConvertableDocumentPage using SharePoint Manager. I knew that there must be some sort of connection as if you Edit the ConvertableDocumentPage is shows you that is has a source document, and lets you edit that document instead. Therefore, they must know where they came from.
In SharePointManager, I found some interesting fields. The ConvertableDocument content type I’d created had a property RcaPageID, which was a GUID. ‘Rca’ stands for ‘Rich Client Authoring’, which is what they seemed to call this page authoring technique until some decided to call it ‘Smart Client Authoring‘ instead. Certainly, internally it’s normally referred to as Rich Client Authoring, or ‘Rca’.
I then checked the ConvertableDocumentPage type, which had a property RcaSourceDocID . This was a GUID, and this ID matched the RcaPageID of the document we used to create the page. Thus, and I’m pretty sure about this, it’s the connection between the source Document and destination Page.
Therefore, I could build an event handler that (when a page is updated or created) gets the Page’s source document, sees what columns they share, and copies across the values of those shared columns. Actually, it’d probably have to exclude some (like title), but you get the idea. Also, it’d have to run a query across all the documents in the site collection, but I’m pretty sure that this is possible.
I like this solution, and think it’s a fairly straight forward, generic candidate for a feature, but unfortunately our customer is unable to make server configuration changes – like installing new features. So that rules that idea out… damn.
Don’t use the Document Conversion Service
I know, this seems a bit crazy – but you could author your content in Word and just copy and paste the content into your pages. This is what our customer was doing. I know, it seems a little crazy to me too, but if you lock down the styles available in a Word template, then the code you’ll copy will have consistent CSS styles in it, and you can prevent any inline CSS through that restriction too. It has no server footprint and no duplication of metadata – but you still have to store the documents (which might require column data too).
So those were the options I was able to come up with. I like the coding option – an event handler could be a very elegant way of dealing with this.
Document Conversion Service doesn't map column data – Part I
(For the purposes of this post, I’ll use Pages with a capital P to mean items in SharePoint of a Page content type, or a child content type of Page. I’ll also refer to all content types in italics)
One of our customers wants to author their Pages in SharePoint in Word. Sounds like a case for the Document Conversion Service – author the content in Word, and then convert the Document to a Page. There is a catch though – they’re wanting to capture some meta-data about the document too, such as business unit, review date, department that ‘owns’ the page, etc.. What would the Document Conversion Service do with this information? I didn’t remember seeing any way of setting up mappings between fields. Would the metadata be copied if both the Document and Page content types shared the same site column?
To find out, I did a bit of testing. Much of what I did was actually stuff like creating a new Page layout, and then customizing it. There are better articles about this that my notes, but I’ll include all the steps. (I do assume that you have the document conversion service running and enabled on your site collection though.) I did the following:
I created a new Site Column – I called it AWBText. It was just a text column.
I created a new Document content type which used that new column. I called this content type the ConvertableDocument content type:
I then created a new Page content type. I called this the ConvertableDocumentPage content type:
I made sure that that also used the AWBText column – and the out-of-box ‘Page Content’ column. This column will hold the content of the converted document. You should probably add another column for holding the style information, but I didn’t bother (‘cos I didn’t need it for the test). You could create your own, but I chose just to use the same ones as the Article Page content type – after all, the data (page content) is still the same, and this is why different content types can share the same columns.
So, now I’ve got my two content types I’m going to test with, and they both share the AWBText column. However, the ConvertableDocumentPage content type needs a page layout to, well, define how the ConvertableDocumentPage‘s content will be displayed. I cracked open SharePoint Designer, opened my site, and created a page layout:
This gives you a page layout to put your content controls into. We’ve only got a couple:
I created a page layout. Here’s the code and how it looked in SharePoint designer:
As you can see, I’m displaying my AWBText field at the top, with the converted content from our converted ConvertableDocument below. Both fields also have labels. I published and approved the layout.
Next, I set up a template Word document – I went to the ConvertableDocument content type’s advanced settings, and edited the template.
I then just saved the template without making any changes – I’ve found that you need to do this to get the Document information panel to work correctly.
Next up, I set up the document conversion through ConvertableDocument content type’s settings:
Then the complex form of the conversion setup:
Take a moment to look at that form. I’ve defined that I want to convert my ConvertableDocument to a page layout of ConvertableDocumentPageLayout – which implies a content type of ConvertablePageLayout. I’m putting the content of the converted content into the Page Content column, and removing any styles (because, as mentioned above, I don’t have a suitable column to put the style information into). Note that there are no settings for other data mappings – no columns of the document to columns of the page mapping.
I saved these settings, added my ConvertableDocument type to a Document Library, and added my ConvertableDocumentPage type to the ‘Pages Library’. Then I created an example document. Note the Document Information Panel at the top shows my AWBText column (and the Title column), and I’ve put in some text.
I saved this, and in the document library I chose to convert the document to a web page:
This resulted in a page that looked like:
And the document library looked like:
So, as we can see, the AWBText column has not been copied across, even though it is the same column. During the configuration process, there was no option to configure mapping of fields. It looks like the Document Conversion Service doesn’t map column data. In Part II, I’ll look at some options.
Restrict or Permit formatting changes in Word Documents
Word 2007 lets you restrict the styles and formatting people can use in documents based on a particular template. I suspect that this will be useful for me in restricting the styles used in SharePoint’s Rich Client Authoring (aka Smart Client Authoring – I wish they’d pick a terminology).
Just as a quick example, though, you get do this through the manage styles dialog. To open this, open the styles menu from the ribbon, and select the manage styles option: Continue reading “Restrict or Permit formatting changes in Word Documents”