MSI Setup projects in Visual Studio : 2005 != 2008

I’ve been working on a project that is a shared plugin to Office 2003. I was writing this in Visual Studio 2005, but for a variety of reasons (not least of which was having a tidier dev environment), I decided to move this onto a convenient VM which happened to have a lot of the things I needed (MOSS, a domain controller, AD, exchange).

Unfortunately, it also had Visual Studio 2008 too. I didn’t think this would be a problem, though, and so I when I opened the project on it for the first time and it asked me to upgrade the project to 2008, I was happy do. I didn’t think there’d be a problem.

Well, during development, there wasn’t. Whenever I went to test my MSI installer, though, I started to have problems. Installation kept failing and I kept getting the error:

Error 1937. An error occurred during the installation of assembly ‘Extensibility,Version=”7.0.3300.0″,Culture=”neutral”,PublicKeyToken=”B03F5F7F11D50A3A”,ProcessorArchitecture=”MSIL”‘. The signature or catalog could not be verified or is not valid. HRESULT: 0x80131045. assembly interface: IAssemblyCacheItem, function: Commit, component: {8C306A7E-AE8E-14F0-4168-C43060985CF4}

This was surprising. Extensibility.dll isn’t one of mine – it’s a Microsoft one that should’ve been in the Primary Interop Assemblies for Office. Anyway, it’s not one of mine, it hadn’t changed, and it was signed correctly. So what gives? Continue reading “MSI Setup projects in Visual Studio : 2005 != 2008”

Advertisement
MSI Setup projects in Visual Studio : 2005 != 2008

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.

Outlook showing the Pages library, but can't preview the page.

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:

An XML file that is shown when you open the Page item from Outlook

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.

Can you sync a Pages library with Outlook?

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”

Outlook 2003 to SharePoint 2007 Email Integration

PowerPoint Slideshows (.pps) open as PowerPoint Files

Hmm. One of our salesmen called up today with an interesting problem. We’d published some PowerPoint presentations as slide shows (.pps files). If you open one of these, it should just launch PowerPoint into the presentation. However, he was opening them from our website and they were opening as a normal PowerPoint (.ppt) file. That is they were opening ready for editing, not in presentation mode. Weird.

I remembered having seen this before, but a bit of poking around showed that my fix was still in place. Curious. When I clicked on the link to the presentation I got the ‘Download or Open’ dialog thingy:

Vista's File Open or Save Dialog in Internet Explorer

First off I noticed that the file extension was .pps – good. I tried opening the file – and it opened it as if it were a .ppt file. Weird. So then I tried the other option – I saved it to my local machine and opened it locally. This time it opened correctly – it opened as a slideshow.

Hmm. So, they’re the same file, but something different is happening when they open. I wondered if it was to do with the HTTP headers, but the same difference occurs when the file is being served with the application/vnd.ms-pps or just text/html (we run MCMS 2002 on a IIS webserver but publish as static content to an Apache server. They serve the file as different mime types, but have the same result – Open opens the file for editing and Save and open shows the slideshow).

Next up, I tried the same experiment using Firefox. If you choose to Open the file rather than save it, it opens the slideshow – correctly! And if you save it, well, it saves the .pps file which, again, opens correctly.

text/html mime-type application/vnd.ms-pps mimetype
“Open” “Save” and open “Open” “Save” and open
IE7 WRONG OK WRONG OK
Firefox OK OK OK OK

So it looks like Internet Explorer will not open a .pps file as a slideshow irrespective of the mime type sent by the server and the .pps extension (and it’s file association in windows). However, if you save the file locally, it will. Weird.

The only thing that I can think is that this is some sort of security feature, but it’s a bit odd – after all, shouldn’t Firefox do this then?

PowerPoint Slideshows (.pps) open as PowerPoint Files

Comparison of different ways of putting content into SharePoint 'Pages'

Previously I’ve looked at a couple of ways of entering your data into a Publishing Page. Well, it turns out that really there are 3 ways of putting content in:

  1. Writing content directly using the Content Editor control (the RichHTMLField control)
  2. Writing content in Word 2007 and using the Document Conversion service
  3. Writing content in Word 2007 and cutting and pasting(!)

I decided to test and compare these techniques. For options 2. and 3. I used this document:

The Source Word 2007 Document

Let’s look at the results of this and the code that is behind each resulting page… Continue reading “Comparison of different ways of putting content into SharePoint 'Pages'”

Comparison of different ways of putting content into SharePoint 'Pages'

Document Conversion Service and Images

It’s worth noting, the document conversion service doesn’t convert embedded images – which is a pain (and why? They’re available as image files inside the .docx file! Come on Microsoft, that’s craaaazy!)

Instead, you have to insert them as linked objects :

Objects such as images that you add to your Word 2007 document will not appear on the converted Web page if they are embedded in the document. To add these objects so that they appear on the converted Web page, first upload these objects to a document library and then insert them as linked objects (from this location) rather than embedded objects in your document.

There are some instructions here, but this is my guide:

First, find your image on your web page. In SharePoint, this might be a Picture Gallery. Copy the image by Right Click > Copy

Go to Word, and Paste > Paste Special…

The Paste Special Menu

Select that you want HTML Format :

And congratulations, you’ve inserted a link to the image on the web server, rather than the image itself:

Document Conversion Service and Images

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”

Restrict or Permit formatting changes in Word Documents

Missing Content Type fields in the Document Information Panel

The Document Information Panel is great – it allows you to surface metadata to be filled in about a Word 2007 document in the client.

Document Information Panel Correct

This is great, but I had a bit of a puzzling problem. I’ve set Libraries up to use this features many times now, and it’s pretty straight forward – I’ve added columns to the library, and then the template document for the library has included those columns. Thus, you just go into your document library, click new, and you get a blank word document with the correct document information panel thing. Sometimes I’ve modified that template, but that’s pretty straight forward through the Library Settings pages (Document Library Settings > Advanced Settings > Edit Template).

This time, though, I was using content types (i.e. setting up the library properly), rather than just adding columns directly to a list. Content Types encapsulate (amongst other things) their own set of metadata to be captured – so in other words, they define columns to be added to a list. That’s fine (and very useful).

However, when I went to my document library, clicked ‘New’ and selected my Content Type, I got a blank word document with only one field in the document information panel – title. The blankness was expected (I’d not defined my own template) but none of the other bits of metadata I’d defined for my content type were there. This was a bit of a puzzle. What was different?

Well, after much thinking, I realised something – Content Types ‘inherit’ from each other. My Content Type derived from the Document content type, which specified just one field of metadata – Title. Then it hit me – content types themselves have document templates. My new content type was inheriting from Document, and it was still using the Document content type’s template document. I specified my own template document for my content type and suddenly I had all of my fields available in the document information panel.

It is interesting that there is this difference between the document information panel fields being defined by the library when just using the default ‘Document‘ content type and no others, and the fields being defined by the content type you’ve created if you’re using other types (I.e. you’ve enabled ‘Allow management of content types’ on the Document Library Settings > Advanced Settings page).

Related to this, then, is the question of what happen if you add a column to a list. However, I’ll cover this in another post.

Missing Content Type fields in the Document Information Panel

Error: "The document information panel was unable to load"

I was building a demo where I was wanting to show the document information panel in Word 2007 (which I think is one of the neatest features about it!) . It should look like:

Document Information Panel Correct

But instead I was getting “The document information panel was unable to load“.

Document Information Panel Error

I couldn’t see a reason for this, but investigation found this post which shows the same error, and a solution in the comments:

The System Event Nofication Service (SENS) uses the same communication “channels” (not the correct word, but works) as does office products do in communicating with the server.
Stop and disable the SENS service on the server and everything will work perfectly.

So, open a command prompt and type:
net stop sens

Bit strange, but that fixed it for me. Also note the comment at the bottom that the Document Conversions service doesn’t work on a single server demo system like this.

Error: "The document information panel was unable to load"